import pandas as pd
import numpy as np
from sklearn import preprocessing
import matplotlib.pyplot as plt
le = preprocessing.LabelEncoder()
data = pd.read_csv("./disponibilidad.csv", sep=";")
df = pd.DataFrame(data)
df.head(10)
| dia_desde | hora_desde | dia_hasta | hora_hasta | lugar | Region | Comuna | Tipo_Servicio | |
|---|---|---|---|---|---|---|---|---|
| 0 | Saturday | 13:00 | Sunday | 18:00 | Region metr | Región Metropolitana de Santiago | La Cisterna | Camión Completo |
| 1 | Tuesday | 15:00 | Tuesday | 00:00 | Santiag | Región Metropolitana de Santiago | Santiago | Camión Completo |
| 2 | Tuesday | 17:00 | Tuesday | 23:00 | Antofa | II - Antofagasta | Antofagasta | Camión Completo |
| 3 | Saturday | 20:00 | Saturday | 20:00 | San pedro 872. La Florida | Región Metropolitana de Santiago | La Florida | Camión Completo |
| 4 | Thursday | 15:00 | Thursday | 15:00 | Las gavillas 2920. San Bernardo | Región Metropolitana de Santiago | La Pintana | Camión Completo |
| 5 | Tuesday | 18:00 | Thursday | 19:00 | Osorn | X - Región de Los Lagos | Osorno | Camión Completo |
| 6 | Sunday | 15:00 | Sunday | 15:00 | Antofagasta | II - Antofagasta | Antofagasta | Camión Completo |
| 7 | Wednesday | 15:00 | Thursday | 20:00 | Calle creta 3005. Puente Alto | Región Metropolitana de Santiago | Puente Alto | Camión Completo |
| 8 | Tuesday | 08:00 | Wednesday | 08:00 | Santiago | Región Metropolitana de Santiago | Curacaví | Camión Completo |
| 9 | Monday | 00:00 | Tuesday | 00:00 | Reina de chile 910. Recoleta | Región Metropolitana de Santiago | Recoleta | Camión Completo |
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 599 entries, 0 to 598 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 dia_desde 599 non-null object 1 hora_desde 599 non-null object 2 dia_hasta 599 non-null object 3 hora_hasta 599 non-null object 4 lugar 599 non-null object 5 Region 599 non-null object 6 Comuna 599 non-null object 7 Tipo_Servicio 599 non-null object dtypes: object(8) memory usage: 37.6+ KB
df['lugar'].nunique()
429
df['lugar'].unique()
array(['Region metr', 'Santiag', 'Antofa', 'San pedro 872. La Florida',
'Las gavillas 2920. San Bernardo', 'Osorn', 'Antofagasta',
'Calle creta 3005. Puente Alto', 'Santiago',
'Reina de chile 910. Recoleta', 'San',
'Cacique pelantaro 10508. El Bosque', 'Santa ana 1685. San Ramón',
'La ligua', 'Calama',
'Avda Pedro Aguirre Cerda 11092. Antofagasta', 'Pula 8825',
'Las Delicias 930 42. Buin', 'santiago', 'Temuco',
'Mantos blanco 4120. Calama', 'Antofagasta ', 'Coquim', 'San an',
'Puerto montt', 'Virginio Arias 9322 . La Florida', 'Osorno',
'Coquimbo', 'Lamap', 'Pasaje del Estero 7524. Huechuraba', 'S',
'Ñusta huyka 3453. Calama', 'Ovalle', 'region metr', 'valdivia',
'Talca', 'la ', 'Pudahuel', 'Cordova 298. Quilicura',
'Moneda 1576. Santiago', 'Golfo Pérsico . Maipú',
'Errázuriz . Buin', 'Lampa', 'Paine ', 'Temuco ',
'Francisco del Campo . Osorno', 'Castro', 'ALTAMIRA 896. Taltal',
' null. Cerro Navia', 'Cala', 'Chill', 'Sangiagi',
'Estero pileo 131. Coronel', 'Loncoche', 'Puerto ', 'Arica',
'Caleta cruz grande 2871. Osorno', 'Chilla', 'Pitru', 'Puerto',
'arica', 'Santi', 'Calam', 'Miraflores 26. Chimbarongo', 'Los a',
'viña del ', 'Ari', 'Monseñor emilio rojas 448. Chiguayante',
'Rancagua ', 'Valpara', 'Los angeled', 'Placi', 'Oso', 'Talcahua',
'Teno ', 'Rancagua', 'bulnes', 'Con', 'La n',
'Gómez Carreño 2257 . Iquique', 'San bernardo',
'LAS ACACIAS 2849. La Pintana', 'Los an',
'Bodegas san francisco laguna sur ',
'PASAJE WASHINGTON MUÑOZ 7722. Antofagasta', 'Ran',
'PASAJE PARROQUIA NUESTRA SEÑORA DE BELEN 685. Quilicura',
'REBECA MATTE 4787. Maipú', 'Puer', 'Lampa ',
'BULNES 420. Nacimiento', 'San fe', 'valparaiso',
'CALLE TERESA DE CALCUTA 6 PONIENTE 01611. Puente Alto',
'Lo biza ', 'RATA T 70 KM4 Ruta t 70 km4. La Unión',
'KM 3 CAMINO FREIRE A VILLARRICA null. Freire', 'Quili',
'Santiaho', 'Quilicura ', 'PAMPA UNION 9120. Antofagasta', 'Es',
'Bio bio', 'Los olivos', 'MARÍA VIAL 7978. La Cisterna',
'ZAPADORES 2646. Conchalí', 'Ant', 'Reg', 'Temuc',
'LAS BRISAS 2179. Concepción', 'Constantinopla ',
'CAMINO INTERNACIONAL 1670. Pucón', 'Mejill', 'San Fernando',
'OCHAGAVIA 10812. El Bosque', 'la ligua', 'Quillo',
'PANAMERICANA NORTE Km 108. Hijuelas', 'La flor', 'Colo colo 921',
'Santiafo', 'AVE VICUÑA MACKENNA PONIENTE 6239 6239. La Florida',
'Sant', 'La reina', ' null. Calera de Tango',
'SAN PABLO 9369 . Pudahuel', 'Villa', 'Iquique',
'SU SANTIDAD DÁMASO 447. Quilicura', 'TAMARIS 6711. Peñalolén',
'calama', 'HONDURAS 9210. La Florida',
'LOS CHONOS 8967. La Florida', 'AV. COSTANERA PONIENTE 500. Lampa',
'Vill', 'Valdi', 'Talca ', 'La serena', 'Los andes', 'Co',
'AVENIDA NUEVA PROVIDENCIA 1881. Providencia', 'Cal', 'anto',
'OSORNO 0539. La Granja', 'Puert', 'PASAJE MIRA 8606. Pudahuel',
'imperial mapocho', 'Te', 'Curico', 'Brisa del sol. calle ',
'Puente', 'Caler', 'ACHAO 726. La Reina', 'Cauq',
'PRIAPUS 997. Renca', 'Copiapo', 'Hue', 'Valdivi',
'CAMINO INTERIOR CASA D BATUCO LAMPA CASA D. Lampa',
'PASAJE ALPACA 2137. Puente Alto', 'JUPITER 1541. Quinta Normal',
'Sur puerto', 'viña', 'RIO BOROA 1545. Cerro Navia',
'VILLA VICENTE HUIDOBRO NÚMERO 034 ALTO JAHUEL BUIN 034. Buin',
'Las co', 'Quillota', 'Coqui', 'AV LAS SALINAS 150 . El Tabo',
'AV EL.CONQUISTADOR 600. Maipú', 'Lo boza', 'Chillan', 'Chi',
'vitacura', 'LOS SICOMORROS 2457. Puente Alto', 'Lebu',
'LAS TRES PASCUALAS 311. La Reina',
'FRIDA KHALO 7 7. San Bernardo',
'COMUNIDAD SAN JOSE PASAJE 8 941. Chillán', 'Coyaique',
'PJE DE LA ESPUELA 222. Quilicura', 'Coyhaique', 'tem',
'CALLEJON SAN ANTONIO 18. Hijuelas', 'La serena ', 'Antofagssta',
'PASAJE LUNA 755. Pudahuel', 'AV EL TREBOL 121. Padre Hurtado',
'La florida', 'AV. RODRIGO DE ARAYA 3967. Macul',
'FRANCISCO A. PINTO 0418. San Fernando', 'puerto montt',
'Valparaiso',
'LUGAR LA CANTERA S/N CAMINO A CARAHUE Oo. Nueva Imperial',
'AV NOCEDAL 673 PUENTE ALTO 673. Puente Alto',
'CUADRO VERDE 160. Estación Central',
'FERNANDO MASSIFF DE LA FUENTE 4879. Macul',
'AV BRASIL 7891 . Renca', 'Region metropo',
'EL QUEULE 02501. La Pintana', '18 DE SEPTIEMBRE 210. Chillán',
'FELDESPATO 1378. Conchalí',
'DOCE DE OCTUBRE 0627 . San Bernardo', 'Regio', 'Meli',
'SAN ALFONSO 259. Estación Central', 'EL TRIÁNGULO 1. Maule',
'BERLÍN 843. San Miguel', 'AMUNATEGUI 725. Santiago', 'Coy',
'ORLANDO GUAITA 750. Coquimbo', ' null. Talca',
'SIMPSON 768. Coihaique', 'LOS NARANJOS 3728. Talcahuano',
'MIRAFLORES 660 . Lampa',
'AVENIDA CENTRAL Poblacion papelera. Puente Alto',
'CAPITÁN GUILLERMO 01086. Punta Arenas', 'Vallen', 'castro ',
'antofagas', 'ESTADOS UNIDOS 3071. Alto Hospicio', 'San ber',
'Santiago ', 'Quilicura', 'Copec de fre',
'ANA MARIA IBACETA 8028. Antofagasta',
'PASAJE CANCIÓN DE LA PAMPA HUECHURABA 5705. Huechuraba',
'Region metropilitn', 'SAN LUIS Parcela 21. Lampa', 'Puerto m',
'LOS ARTESANOS . Renca', 'Conce', 'LANGONG ONCE 595. Temuco',
'Coronel', 'Huechurabs', 'Chillán ', 'Pueto', 'Iqui', 'Talcaguano',
'DEIDAMIA ZELADA 2189. Buin', 'Arics',
'LOS TRICAHUES 2155. Huechuraba', 'Concep', 'La',
'ERNESTO SAMIT 736. Quinta Normal', 'SA', 'Santia',
'VILLORRIO SAN PASCUAL 21. Paine',
'NIBALDO SCHWENQUE 1677. Valdivia', 'Recole',
'AV LA ESTRELLA 473. Pudahuel', 'La torre 287. Santa María',
'Mall plaza tobalaba ', 'Avenida ejercito libertador 371.',
'LOS COIGUES 02444. Coronel', 'JUAN DE BARROS 3880. Quinta Normal',
'Puente alto ', 'Ñuñ', 'San f',
'HIPÓDROMO DE CHILE 1673. Independencia',
'PASAJE LOMA EL CAPATAZ 112. Lampa', 'Easy v',
'CALLE BOLIVIA 2192. Rancagua', 'ARTURO PRAT 749. Lampa',
'Viña del ma', 'PLACER 880 local 218-220. Santiago',
'CALLE SANTA ROSA DE HUARA 4036. Alto Hospicio',
'LOS ATACAMEÑOS 1147. Quilicura', 'SARGENTO ALDEA 208. La Serena',
'LOS METALES 391. Cerrillos', 'QUINTA AVENIDA 1437. San Miguel',
'LA DORMIDA 963. Maipú', 'Pu',
'DIEGO BARROS ARANA 900. Huechuraba', 'Temu', 'Talcahuano',
'LOS ALERCES 29. Estación Central', 'Calbuco', 'Anto',
'Los pinos San ', 'Valpa', 'MANUEL MONTT 225. Concepción',
'Calera ', 'ESTACIÓN PURRANQUE 3264. Puente Alto',
'Viña del Mar ', 'CHACALLUTA 629. El Bosque',
'BALTAZAR LOPEZ 3971. Macul', 'STA CLARA S/n. La Cisterna',
'GENARO GALLO 2567-A. Iquique', 'SANTA ISABEL null. Chimbarongo',
'sant', 'las torres 800 hu',
'SAN BARTOLOME DE GAMBOA 47. Chillán Viejo', 'CALA',
'LOS PARRONES 1932. Peñaflor', 'SAN GUILLERMO 378. La Florida',
'Pitr', 'Peleq', 'BAQUEDANO 8610. Pudahuel',
'PAIHUEN 2755. Osorno', 'Santuago', 'concep',
'OVALLE null. Ovalle', 'SAN SIMON 0298. La Cisterna',
'LOS NOGALES 160. Maipú', 'Coron', 'FERROCARRIL 7509. Maipú',
'Maipu', 'MONTE IGELDO 01863. Temuco', 'Osorno ',
'EL ULMO 9. Padre Hurtado', 'Ranca',
'SAN NICOLAS 681. San Miguel', 'EL QUISO 141. Talcahuano',
' null. Maule', 'VILLASANA 1451. Quinta Normal',
'PASAJE EL BELLOTO 1102. Puente Alto', 'VILLASECA 1560. Buin',
'EL CARMEN DE HUECHURABA 1540. Huechuraba',
' Montau 1509. Independencia',
'AVENIDA CENTRAL 881 11. San Bernardo',
'BAQUEDANO 239. Antofagasta', 'TIGNAMAR 2857. Puente Alto',
'Region metropolitana', 'PEATONES DIEZ 4751 C. Macul',
'Region del', 'Victori', 'MACHALI', 'La calera',
'LOS MAITENES 0890. Mulchén', 'Region metro',
'LA TORRE POBLACION ANGAMOS SANTA JULIA PARADERO 7 5. Viña del Mar',
'Los ESPINOS Parcela 49. Lampa', 'Quilicu',
'AV LAS PERDICES 6577. La Florida', 'QUINHUE 1575. Cauquenes',
'ALMIRANTE RIVEROS 72. Valparaíso',
'CUATRO ESQUINAS 0560. La Serena', 'Los angeles',
'LEONIDAS BANDERAS 6918. La Reina', ' null. San Bernardo',
'Valle grande', 'Maestranza', 'Chile',
'CARLOS DITTBORN 702. Ñuñoa', 'Cur', 'Curico ', 'Región metr',
'San antonio', 'AVENIDA LOS TOROS 05580. Puente Alto',
'CINERARIAS 4525. La Serena', 'La ',
'PASAJE PALMA ARECA 288. Peñaflor', 'MARCO ALEMAN 790. Pudahuel',
'Lima ', 'Talaca', 'Paine', 'CUARTEL 345. Hijuelas',
'ROSA ESTER 02710. La Pintana', 'Claudio ', 'Quintero',
'Tsantiago', 'PRESIDENTE IBAÑEZ 2043. Padre Hurtado',
'MIRADOR DE BISQUE NORTE 1511 1511. Puerto Montt',
'PASAJE SAN CLEMENTE 8487. Pudahuel',
'LAS HORTENCIAS 1568. Quilpué', 'Talcaa',
'CAMINO LONQUEN 4520. San Bernardo',
'VIRGINIA BRAVO LETTELIER 1246. Valparaíso', 'Curauma Valparaíso',
'Isl', 'San fer', 'Sanriagi', 'Osprno',
'PUERTO MONTT 18443. Maipú', 'CERRO PIDANCO 02035. Temuco',
'SOTOMAYOR 97. Teno. Curico Ch',
'PASAJE LOS ESTRIBOS 1075. Colina', 'LO ENCALADA 1415. Ñuñoa',
'SCHEAT 8555. Pudahuel', 'LOS TILOS 179. Maipú', 'Valdivia',
'BOULEVARD SAN CRISTOBAL 526. Lampa',
'LAS VIOLETAS 2524. Quilpué', 'Ppuerto m', 'Puerto Montt',
'AV MARATHON MACUL 4899. Macul', 'Marchihue', 'santi', 'buin',
'ARAUCANIA 1360. Cerro Navia', 'BAQUEDANO 239. Antofagasta',
'LAS REINAS LUISAS 5605. Huechuraba', 'PASAJE 6 4374. Hualpén',
'An', 'PASAJE ALBERTO HURTADO 89 null. Curicó',
'AV. ESPAÑA 11115-b. Curicó', 'INCA DE ORO 7808. La Granja',
'CAMINO SAN AGUSTIN PARCELA 9 LOTE A4 null. Calera de Tango',
'Los condes. san', ' null. Los Lagos', 'Megacentro',
'AV. MACUL 5121. Macul', 'Cañe', 'CALLE RAVAL 2016. Renca',
'Cald', 'JUAN WILLIAMS 010350. Punta Arenas',
'AV BRASIL 920. Santiago', 'SAN FRANCISCO 6548. Cerro Navia',
'9 1/2 ORIENTE 1774. Talca', 'Senda 8 674. Concepción', 'Pedro',
'conce', 'Linares', 'Coq', 'EDELMIRA 365. Talcahuano',
'RIO BAKER 1272. Quilpué', 'AGUAS MARINAS 760. El Bosque', 'maule',
'AVENIDA LOS LOROS 1472. Copiapó',
'ELEUTERIO RAMÍREZ 780 +56994957395. Santiago',
'YUNQUE ORIENTE 69. Machalí', 'Concepcon',
'LOS CLATERIANOS 9411. Pudahuel', 'SAN FRANCISCO 242. Santiago',
'LOS PENSAMIENTOS 145 casa 2. San Pedro de la Paz',
'LAS VIOLETAS 24. Machalí',
'CAMINO LA ESCUEL Parcela 47 - 6. Pirque', 'Cpncep'], dtype=object)
df = df.drop(['lugar'],axis=1)
df
| dia_desde | hora_desde | dia_hasta | hora_hasta | Region | Comuna | Tipo_Servicio | |
|---|---|---|---|---|---|---|---|
| 0 | Saturday | 13:00 | Sunday | 18:00 | Región Metropolitana de Santiago | La Cisterna | Camión Completo |
| 1 | Tuesday | 15:00 | Tuesday | 00:00 | Región Metropolitana de Santiago | Santiago | Camión Completo |
| 2 | Tuesday | 17:00 | Tuesday | 23:00 | II - Antofagasta | Antofagasta | Camión Completo |
| 3 | Saturday | 20:00 | Saturday | 20:00 | Región Metropolitana de Santiago | La Florida | Camión Completo |
| 4 | Thursday | 15:00 | Thursday | 15:00 | Región Metropolitana de Santiago | La Pintana | Camión Completo |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 594 | Monday | 15:00 | Monday | 15:00 | Región Metropolitana de Santiago | Santiago | Camión Completo |
| 595 | Thursday | 23:00 | Tuesday | 20:00 | VIII - Región del Bío Bío | San Pedro de la Paz | Camión Completo |
| 596 | Friday | 09:00 | Monday | 16:00 | VI - Región de OHiggins | Machalí | Arriendo por horas |
| 597 | Monday | 15:00 | Monday | 15:00 | Región Metropolitana de Santiago | Puente Alto | Camión Completo |
| 598 | Tuesday | 16:00 | Wednesday | 08:00 | VIII - Región del Bío Bío | Concepción | Camión Completo |
599 rows × 7 columns
print("valores dia_desde: ", df['dia_desde'].unique())
print("valores dia_hasta: ",df['dia_hasta'].unique())
valores dia_desde: ['Saturday' 'Tuesday' 'Thursday' 'Sunday' 'Wednesday' 'Monday' 'Friday'] valores dia_hasta: ['Sunday' 'Tuesday' 'Saturday' 'Thursday' 'Wednesday' 'Monday' 'Friday']
from numpy import array
data_desde = df['dia_desde']
data_hasta = df['dia_hasta']
value_desde = array(data_desde)
value_hasta = array(data_hasta)
df['dia_desde'] = le.fit_transform(value_desde)
df['dia_hasta'] = le.fit_transform(value_hasta)
print("nuevos valores numericos dia_desde: ", df['dia_desde'].unique())
print("nuevos valores numericos dia_hasta: ", df['dia_hasta'].unique())
nuevos valores numericos dia_desde: [2 5 4 3 6 1 0] nuevos valores numericos dia_hasta: [3 5 2 4 6 1 0]
print("cantidad de dias_desde: ", df['dia_desde'].nunique())
print("cantidad de dias_hasta: ", df['dia_hasta'].nunique())
cantidad de dias_desde: 7 cantidad de dias_hasta: 7
Las nuevas caracteristicas son:
| N° | dia |
|---|---|
| 0 | Friday |
| 1 | Monday |
| 2 | Saturday |
| 3 | Sunday |
| 4 | Thursday |
| 5 | Tuesday |
| 6 | Wednesday |
Por ejemplo: '11:30' ---Redondeado--> '12:00'
'11:20' ---Redondeado--> '11:00'
#### Esto nos permitira reducir la cantidad de dimensiones existentes en la caracteristica y mejorar la calidad de los datos.
Reemplazar estos valores identificados por sus respectivos valores.
df['hora_desde'].nunique()
33
df['hora_desde'].unique()
array(['13:00', '15:00', '17:00', '20:00', '18:00', '08:00', '00:00',
'12:00', '10:00', '11:00', '21:00', '14:00', '22:00', '09:00',
'15:30', '14:30', '11:30', '19:00', '23:00', '13:30', '01:00',
'07:00', '08:30', '03:00', '16:00', '02:00', '16:30', '06:00',
'05:00', '10:30', '09:30', '04:30', '04:00'], dtype=object)
df['hora_desde'].value_counts()
08:00 45 09:00 44 10:00 44 14:00 40 12:00 39 11:00 36 17:00 34 13:00 33 15:00 31 16:00 29 00:00 28 22:00 27 21:00 24 23:00 24 20:00 23 18:00 22 07:00 18 19:00 15 06:00 10 01:00 7 05:00 7 04:00 3 14:30 2 09:30 2 02:00 2 03:00 2 08:30 2 15:30 1 16:30 1 10:30 1 11:30 1 13:30 1 04:30 1 Name: hora_desde, dtype: int64
Los valores a reemplazar son:
| N° | Hora | Redondeo |
|---|---|---|
| 1 | 15:30 | 16:00 |
| 2 | 16:30 | 17:00 |
| 3 | 08:30 | 09:00 |
| 4 | 10:30 | 11:00 |
| 5 | 09:30 | 10:00 |
| 6 | 13:30 | 14:00 |
| 7 | 11:30 | 12:00 |
| 8 | 14:30 | 15:00 |
| 9 | 04:30 | 05:00 |
df.loc[df['hora_desde'] == '15:30', 'hora_desde'] = '16:00'
df.loc[df['hora_desde'] == '16:30', 'hora_desde'] = '17:00'
df.loc[df['hora_desde'] == '13:30', 'hora_desde'] = '14:00'
df.loc[df['hora_desde'] == '08:30', 'hora_desde'] = '09:00'
df.loc[df['hora_desde'] == '04:30', 'hora_desde'] = '05:00'
df.loc[df['hora_desde'] == '10:30', 'hora_desde'] = '11:00'
df.loc[df['hora_desde'] == '14:30', 'hora_desde'] = '15:00'
df.loc[df['hora_desde'] == '09:30', 'hora_desde'] = '10:00'
df.loc[df['hora_desde'] == '11:30', 'hora_desde'] = '12:00'
df.loc[df['hora_desde'] == '00:00', 'hora_desde'] = 0
df.loc[df['hora_desde'] == '01:00', 'hora_desde'] = 1
df.loc[df['hora_desde'] == '02:00', 'hora_desde'] = 2
df.loc[df['hora_desde'] == '03:00', 'hora_desde'] = 3
df.loc[df['hora_desde'] == '04:00', 'hora_desde'] = 4
df.loc[df['hora_desde'] == '05:00', 'hora_desde'] = 5
df.loc[df['hora_desde'] == '06:00', 'hora_desde'] = 6
df.loc[df['hora_desde'] == '07:00', 'hora_desde'] = 7
df.loc[df['hora_desde'] == '08:00', 'hora_desde'] = 8
df.loc[df['hora_desde'] == '09:00', 'hora_desde'] = 9
df.loc[df['hora_desde'] == '10:00', 'hora_desde'] = 10
df.loc[df['hora_desde'] == '11:00', 'hora_desde'] = 11
df.loc[df['hora_desde'] == '12:00', 'hora_desde'] = 12
df.loc[df['hora_desde'] == '13:00', 'hora_desde'] = 13
df.loc[df['hora_desde'] == '14:00', 'hora_desde'] = 14
df.loc[df['hora_desde'] == '15:00', 'hora_desde'] = 15
df.loc[df['hora_desde'] == '16:00', 'hora_desde'] = 16
df.loc[df['hora_desde'] == '17:00', 'hora_desde'] = 17
df.loc[df['hora_desde'] == '18:00', 'hora_desde'] = 18
df.loc[df['hora_desde'] == '19:00', 'hora_desde'] = 19
df.loc[df['hora_desde'] == '20:00', 'hora_desde'] = 20
df.loc[df['hora_desde'] == '21:00', 'hora_desde'] = 21
df.loc[df['hora_desde'] == '22:00', 'hora_desde'] = 22
df.loc[df['hora_desde'] == '23:00', 'hora_desde'] = 23
df['hora_desde'].value_counts()
9 46 10 46 8 45 14 41 12 40 11 37 17 35 13 33 15 33 16 30 0 28 22 27 21 24 23 24 20 23 18 22 7 18 19 15 6 10 5 8 1 7 4 3 3 2 2 2 Name: hora_desde, dtype: int64
df['hora_desde'].nunique()
24
df['hora_desde'].unique()
array([13, 15, 17, 20, 18, 8, 0, 12, 10, 11, 21, 14, 22, 9, 16, 19, 23, 1,
7, 3, 2, 6, 5, 4], dtype=object)
df['hora_hasta'].nunique()
38
df['hora_hasta'].unique()
array(['18:00', '00:00', '23:00', '20:00', '15:00', '19:00', '08:00',
'12:00', '11:00', '21:00', '10:00', '22:00', '17:00', '15:30',
'13:00', '23:30', '01:00', '18:30', '14:00', '09:00', '16:00',
'21:30', '14:30', '04:30', '07:00', '19:30', '10:30', '22:30',
'20:30', '05:00', '11:30', '13:30', '03:00', '16:30', '04:00',
'06:00', '17:30', '02:00'], dtype=object)
df['hora_hasta'].value_counts()
00:00 88 23:00 50 22:00 36 18:00 35 17:00 34 12:00 34 20:00 32 21:00 31 15:00 28 14:00 26 16:00 23 19:00 23 10:00 22 11:00 22 23:30 20 13:00 16 09:00 16 08:00 13 01:00 8 07:00 8 19:30 5 20:30 5 14:30 4 22:30 2 02:00 2 15:30 2 18:30 2 21:30 2 16:30 1 11:30 1 03:00 1 17:30 1 05:00 1 06:00 1 04:30 1 10:30 1 04:00 1 13:30 1 Name: hora_hasta, dtype: int64
Los valores a reemplazar son:
| N° | Hora | Redondeo |
|---|---|---|
| 1 | 23:30 | 00:00 |
| 2 | 19:30 | 20:00 |
| 3 | 20:30 | 21:00 |
| 4 | 14:30 | 15:00 |
| 5 | 21:30 | 22:00 |
| 6 | 22:30 | 23:00 |
| 7 | 15:30 | 16:00 |
| 8 | 18:30 | 19:00 |
| 9 | 11:30 | 12:00 |
| 10 | 16:30 | 17:00 |
| 11 | 17:30 | 18:00 |
| 12 | 04:30 | 05:00 |
| 13 | 10:30 | 11:00 |
| 14 | 13:30 | 14:00 |
df.loc[df['hora_hasta'] == '23:30', 'hora_hasta'] = '00:00'
df.loc[df['hora_hasta'] == '19:30', 'hora_hasta'] = '20:00'
df.loc[df['hora_hasta'] == '20:30', 'hora_hasta'] = '21:00'
df.loc[df['hora_hasta'] == '14:30', 'hora_hasta'] = '15:00'
df.loc[df['hora_hasta'] == '21:30', 'hora_hasta'] = '22:00'
df.loc[df['hora_hasta'] == '22:30', 'hora_hasta'] = '23:00'
df.loc[df['hora_hasta'] == '15:30', 'hora_hasta'] = '16:00'
df.loc[df['hora_hasta'] == '18:30', 'hora_hasta'] = '19:00'
df.loc[df['hora_hasta'] == '11:30', 'hora_hasta'] = '12:00'
df.loc[df['hora_hasta'] == '16:30', 'hora_hasta'] = '17:00'
df.loc[df['hora_hasta'] == '17:30', 'hora_hasta'] = '18:00'
df.loc[df['hora_hasta'] == '04:30', 'hora_hasta'] = '05:00'
df.loc[df['hora_hasta'] == '10:30', 'hora_hasta'] = '11:00'
df.loc[df['hora_hasta'] == '13:30', 'hora_hasta'] = '14:00'
df.loc[df['hora_hasta'] == '00:00', 'hora_hasta'] = 0
df.loc[df['hora_hasta'] == '01:00', 'hora_hasta'] = 1
df.loc[df['hora_hasta'] == '02:00', 'hora_hasta'] = 2
df.loc[df['hora_hasta'] == '03:00', 'hora_hasta'] = 3
df.loc[df['hora_hasta'] == '04:00', 'hora_hasta'] = 4
df.loc[df['hora_hasta'] == '05:00', 'hora_hasta'] = 5
df.loc[df['hora_hasta'] == '06:00', 'hora_hasta'] = 6
df.loc[df['hora_hasta'] == '07:00', 'hora_hasta'] = 7
df.loc[df['hora_hasta'] == '08:00', 'hora_hasta'] = 8
df.loc[df['hora_hasta'] == '09:00', 'hora_hasta'] = 9
df.loc[df['hora_hasta'] == '10:00', 'hora_hasta'] = 10
df.loc[df['hora_hasta'] == '11:00', 'hora_hasta'] = 11
df.loc[df['hora_hasta'] == '12:00', 'hora_hasta'] = 12
df.loc[df['hora_hasta'] == '13:00', 'hora_hasta'] = 13
df.loc[df['hora_hasta'] == '14:00', 'hora_hasta'] = 14
df.loc[df['hora_hasta'] == '15:00', 'hora_hasta'] = 15
df.loc[df['hora_hasta'] == '16:00', 'hora_hasta'] = 16
df.loc[df['hora_hasta'] == '17:00', 'hora_hasta'] = 17
df.loc[df['hora_hasta'] == '18:00', 'hora_hasta'] = 18
df.loc[df['hora_hasta'] == '19:00', 'hora_hasta'] = 19
df.loc[df['hora_hasta'] == '20:00', 'hora_hasta'] = 20
df.loc[df['hora_hasta'] == '21:00', 'hora_hasta'] = 21
df.loc[df['hora_hasta'] == '22:00', 'hora_hasta'] = 22
df.loc[df['hora_hasta'] == '23:00', 'hora_hasta'] = 23
df['hora_hasta'].value_counts()
0 108 23 52 22 38 20 37 21 36 18 36 17 35 12 35 15 32 14 27 19 25 16 25 11 23 10 22 13 16 9 16 8 13 7 8 1 8 5 2 2 2 6 1 4 1 3 1 Name: hora_hasta, dtype: int64
df['hora_hasta'].nunique()
24
Region es una variable de tipo categorica. Ya que toma valores desde un conjunto limitado de elementos (Regiones existentes en Chile). Debemos tratar esta caracteristica ya que para el proceso de analisis exploratorio muchos de ellos requieren que las variables sean numericas.
df['Region'].value_counts()
Región Metropolitana de Santiago 278 X - Región de Los Lagos 45 VIII - Región del Bío Bío 42 V - Valparaíso 41 II - Antofagasta 39 IX - Región de la Araucanía 27 VII - Región del Maule 27 IV - Coquimbo 24 VI - Región de OHiggins 23 XVI - Región de Ñuble 13 XIV - Región de Los Ríos 10 I - Tarapacá 9 III - Atacama 6 XV - Arica y Parinacota 6 XI - Región de Aisén 5 XII - Región de Magallanes 2 La Libertad 1 Callao 1 Name: Region, dtype: int64
df['Region'].nunique()
18
df = df[df["Region"] != 'La Libertad']
df = df[df["Region"] != 'Callao']
df['Region'].value_counts()
Región Metropolitana de Santiago 278 X - Región de Los Lagos 45 VIII - Región del Bío Bío 42 V - Valparaíso 41 II - Antofagasta 39 VII - Región del Maule 27 IX - Región de la Araucanía 27 IV - Coquimbo 24 VI - Región de OHiggins 23 XVI - Región de Ñuble 13 XIV - Región de Los Ríos 10 I - Tarapacá 9 XV - Arica y Parinacota 6 III - Atacama 6 XI - Región de Aisén 5 XII - Región de Magallanes 2 Name: Region, dtype: int64
df.loc[df['Region'] == 'I - Tarapacá', 'Region'] = 1
df.loc[df['Region'] == 'II - Antofagasta', 'Region'] = 2
df.loc[df['Region'] == 'III - Atacama', 'Region'] = 3
df.loc[df['Region'] == 'IV - Coquimbo', 'Region'] = 4
df.loc[df['Region'] == 'V - Valparaíso', 'Region'] = 5
df.loc[df['Region'] == 'VI - Región de OHiggins', 'Region'] = 6
df.loc[df['Region'] == 'VII - Región del Maule', 'Region'] = 7
df.loc[df['Region'] == 'VIII - Región del Bío Bío', 'Region'] = 8
df.loc[df['Region'] == 'IX - Región de la Araucanía', 'Region'] = 9
df.loc[df['Region'] == 'X - Región de Los Lagos', 'Region'] = 10
df.loc[df['Region'] == 'XI - Región de Aisén', 'Region'] = 11
df.loc[df['Region'] == 'XII - Región de Magallanes', 'Region'] = 12
df.loc[df['Region'] == 'Región Metropolitana de Santiago', 'Region'] = 13
df.loc[df['Region'] == 'XIV - Región de Los Ríos', 'Region'] = 14
df.loc[df['Region'] == 'XV - Arica y Parinacota', 'Region'] = 15
df.loc[df['Region'] == 'XVI - Región de Ñuble', 'Region'] = 16
Las nuevas caracteristicas son:
| N° | region |
|---|---|
| 1 | I - Tarapacá |
| 2 | II - Antofagasta |
| 3 | III - Atacama |
| 4 | IV - Coquimbo |
| 5 | V - Valparaíso |
| 6 | VI - Región de OHiggins |
| 7 | VII - Región del Maule |
| 8 | VIII - Región del Bío Bío |
| 9 | IX - Región de la Araucanía |
| 10 | X - Región de Los Lagos |
| 11 | XI - Región de Aisén |
| 12 | XII - Región de Magallanes |
| 13 | Región Metropolitana de Santiago |
| 14 | XIV - Región de Los Ríos |
| 15 | XV - Arica y Parinacota |
| 16 | XVI - Región de Ñuble |
df['Region'].value_counts()
13 278 10 45 8 42 5 41 2 39 9 27 7 27 4 24 6 23 16 13 14 10 1 9 15 6 3 6 11 5 12 2 Name: Region, dtype: int64
df['Region'].nunique()
16
df['Region'].unique()
array([13, 2, 10, 5, 9, 4, 14, 8, 16, 15, 6, 7, 1, 3, 11, 12],
dtype=object)
df
| dia_desde | hora_desde | dia_hasta | hora_hasta | Region | Comuna | Tipo_Servicio | |
|---|---|---|---|---|---|---|---|
| 0 | 2 | 13 | 3 | 18 | 13 | La Cisterna | Camión Completo |
| 1 | 5 | 15 | 5 | 0 | 13 | Santiago | Camión Completo |
| 2 | 5 | 17 | 5 | 23 | 2 | Antofagasta | Camión Completo |
| 3 | 2 | 20 | 2 | 20 | 13 | La Florida | Camión Completo |
| 4 | 4 | 15 | 4 | 15 | 13 | La Pintana | Camión Completo |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 594 | 1 | 15 | 1 | 15 | 13 | Santiago | Camión Completo |
| 595 | 4 | 23 | 5 | 20 | 8 | San Pedro de la Paz | Camión Completo |
| 596 | 0 | 9 | 1 | 16 | 6 | Machalí | Arriendo por horas |
| 597 | 1 | 15 | 1 | 15 | 13 | Puente Alto | Camión Completo |
| 598 | 5 | 16 | 6 | 8 | 8 | Concepción | Camión Completo |
597 rows × 7 columns
df['Comuna'].value_counts().count()
131
df['Comuna'].unique()
array(['La Cisterna', 'Santiago', 'Antofagasta', 'La Florida',
'La Pintana', 'Osorno', 'Puente Alto', 'Curacaví', 'Recoleta',
'El Bosque', 'San Ramón', 'La Ligua', 'Calama', 'Cerro Navia',
'Paine', 'Temuco', 'Lo Prado', 'Coquimbo', 'San Antonio',
'Puerto Montt', 'Lampa', 'Ovalle', 'Renca', 'Cerrillos',
'Valdivia', 'Cabrero', 'Pudahuel', 'Maipú', 'Buin', 'Lautaro',
'Los Lagos', 'Taltal', 'San Ignacio', 'Coronel', 'Loncoche',
'Puerto Varas', 'Paillaco', 'Arica', 'Chillán', 'Pitrufquén',
'Estación Central', 'Chimbarongo', 'Los Ángeles', 'Viña del Mar',
'Chiguayante', 'Pichidegua', 'Rancagua', 'Valparaíso',
'Talcahuano', 'Teno', 'Bulnes', 'Concepción', 'Iquique',
'San Bernardo', 'Quilicura', 'Nacimiento', 'San Esteban', 'Ñuñoa',
'La Unión', 'Freire', 'Conchalí', 'Copiapó', 'Pucón', 'Mejillones',
'San Fernando', 'Quillota', 'Calera', 'San Miguel', 'Talca',
'La Reina', 'Villarrica', 'Los Andes', 'Peñalolén', 'La Serena',
'San Pedro de la Paz', 'Providencia', 'La Granja', 'Quinta Normal',
'Curicó', 'Calera de Tango', 'Cauquenes', 'Huechuraba',
'Las Condes', 'El Tabo', 'Vitacura', 'Lebu', 'Coihaique', 'Macul',
'Carahue', 'Melipilla', 'Sagrada Familia', 'Punta Arenas',
'Vallenar', 'Castro', 'Maule', 'Alto Hospicio',
'San José de Maipo', 'Colina', 'Florida', 'Curanilahue',
'Requínoa', 'Padre Hurtado', 'Santa María', 'Peumo',
'Independencia', 'Padre las Casas', 'Maullín',
'Pedro Aguirre Cerda', 'Pichilemu', 'Hualpén', 'Nogales',
'Chillán Viejo', 'Peñaflor', 'Arauco', 'Yerbas Buenas', 'Linares',
'Victoria', 'Machalí', 'Salamanca', 'Caldera', 'San Carlos',
'Hijuelas', 'Pirque', 'Mariquina', 'Teodoro Schmidt', 'Quilpué',
'San Vicente', 'Rinconada', 'Molina', 'Marchihue', 'Cañete'],
dtype=object)
null = df['Comuna'].isna().sum()
f'cantidad de valores nulos: %{null}'
'cantidad de valores nulos: %0'
df.Comuna.value_counts()
Santiago 61
Puerto Montt 26
Antofagasta 23
Puente Alto 17
Maipú 15
..
Mariquina 1
Colina 1
Arauco 1
Yerbas Buenas 1
Pichidegua 1
Name: Comuna, Length: 131, dtype: int64
groupingper = df.groupby('Region')['Comuna'].value_counts()
grouping = pd.DataFrame(groupingper)
grouping = grouping.rename(columns={'Comuna':'disponibilidad'})
grouping
| disponibilidad | ||
|---|---|---|
| Region | Comuna | |
| 1 | Iquique | 5 |
| Alto Hospicio | 4 | |
| 2 | Antofagasta | 23 |
| Calama | 14 | |
| Mejillones | 1 | |
| ... | ... | ... |
| 16 | Chillán | 8 |
| Chillán Viejo | 2 | |
| Bulnes | 1 | |
| San Carlos | 1 | |
| San Ignacio | 1 |
131 rows × 1 columns
dfa = df[['dia_desde', 'dia_hasta','hora_desde', 'hora_hasta','Region', 'Comuna']]
dfa
| dia_desde | dia_hasta | hora_desde | hora_hasta | Region | Comuna | |
|---|---|---|---|---|---|---|
| 0 | 2 | 3 | 13 | 18 | 13 | La Cisterna |
| 1 | 5 | 5 | 15 | 0 | 13 | Santiago |
| 2 | 5 | 5 | 17 | 23 | 2 | Antofagasta |
| 3 | 2 | 2 | 20 | 20 | 13 | La Florida |
| 4 | 4 | 4 | 15 | 15 | 13 | La Pintana |
| ... | ... | ... | ... | ... | ... | ... |
| 594 | 1 | 1 | 15 | 15 | 13 | Santiago |
| 595 | 4 | 5 | 23 | 20 | 8 | San Pedro de la Paz |
| 596 | 0 | 1 | 9 | 16 | 6 | Machalí |
| 597 | 1 | 1 | 15 | 15 | 13 | Puente Alto |
| 598 | 5 | 6 | 16 | 8 | 8 | Concepción |
597 rows × 6 columns
dfa['contador'] = '1'
dfa
| dia_desde | dia_hasta | hora_desde | hora_hasta | Region | Comuna | contador | |
|---|---|---|---|---|---|---|---|
| 0 | 2 | 3 | 13 | 18 | 13 | La Cisterna | 1 |
| 1 | 5 | 5 | 15 | 0 | 13 | Santiago | 1 |
| 2 | 5 | 5 | 17 | 23 | 2 | Antofagasta | 1 |
| 3 | 2 | 2 | 20 | 20 | 13 | La Florida | 1 |
| 4 | 4 | 4 | 15 | 15 | 13 | La Pintana | 1 |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 594 | 1 | 1 | 15 | 15 | 13 | Santiago | 1 |
| 595 | 4 | 5 | 23 | 20 | 8 | San Pedro de la Paz | 1 |
| 596 | 0 | 1 | 9 | 16 | 6 | Machalí | 1 |
| 597 | 1 | 1 | 15 | 15 | 13 | Puente Alto | 1 |
| 598 | 5 | 6 | 16 | 8 | 8 | Concepción | 1 |
597 rows × 7 columns
dfa.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 597 entries, 0 to 598 Data columns (total 7 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 dia_desde 597 non-null int32 1 dia_hasta 597 non-null int32 2 hora_desde 597 non-null object 3 hora_hasta 597 non-null object 4 Region 597 non-null object 5 Comuna 597 non-null object 6 contador 597 non-null object dtypes: int32(2), object(5) memory usage: 32.6+ KB
| N° | dias |
|---|---|
| 0 | Friday |
| 1 | Monday |
| 2 | Saturday |
| 3 | Sunday |
| 4 | Thursday |
| 5 | Tuesday |
| 6 | Wednesday |
| N° | region |
|---|---|
| 1 | I - Tarapacá |
| 2 | II - Antofagasta |
| 3 | III - Atacama |
| 4 | IV - Coquimbo |
| 5 | V - Valparaíso |
| 6 | VI - Región de OHiggins |
| 7 | VII - Región del Maule |
| 8 | VIII - Región del Bío Bío |
| 9 | IX - Región de la Araucanía |
| 10 | X - Región de Los Lagos |
| 11 | XI - Región de Aisén |
| 12 | XII - Región de Magallanes |
| 13 | Región Metropolitana de Santiago |
| 14 | XIV - Región de Los Ríos |
| 15 | XV - Arica y Parinacota |
| 16 | XVI - Región de Ñuble |
| N° | Hora |
|---|---|
| 0 | 00:00 |
| 1 | 01:00 |
| 2 | 02:00 |
| 3 | 03:00 |
| 4 | 04:00 |
| 5 | 05:00 |
| 6 | 06:00 |
| 7 | 07:00 |
| 8 | 08:00 |
| 9 | 09:00 |
| 10 | 10:00 |
| 11 | 11:00 |
| 12 | 12:00 |
| 13 | 13:00 |
| 14 | 14:00 |
| 15 | 15:00 |
| 16 | 16:00 |
| 17 | 17:00 |
| 18 | 18:00 |
| 19 | 19:00 |
| 20 | 20:00 |
| 21 | 21:00 |
| 22 | 22:00 |
| 23 | 23:00 |
dfa.describe()
| dia_desde | dia_hasta | |
|---|---|---|
| count | 597.000000 | 597.000000 |
| mean | 3.169179 | 3.189280 |
| std | 2.110183 | 2.019872 |
| min | 0.000000 | 0.000000 |
| 25% | 1.000000 | 1.000000 |
| 50% | 4.000000 | 4.000000 |
| 75% | 5.000000 | 5.000000 |
| max | 6.000000 | 6.000000 |
dfa.describe(include=[np.object])
| hora_desde | hora_hasta | Region | Comuna | contador | |
|---|---|---|---|---|---|
| count | 597 | 597 | 597 | 597 | 597 |
| unique | 24 | 24 | 16 | 131 | 1 |
| top | 9 | 0 | 13 | Santiago | 1 |
| freq | 46 | 108 | 278 | 61 | 597 |
print('Conteo:',dfa['dia_desde'].count(),'Registros')
print('Promedio:',dfa['dia_desde'].mean())
print('STD:',dfa['dia_desde'].std())
print(dfa['dia_desde'].quantile([.25, .5, .75]))
print('*******')
print('Mínimo:',min(dfa['dia_desde']))
print('Máximo:',max(dfa['dia_desde']))
Conteo: 597 Registros Promedio: 3.169179229480737 STD: 2.110183401895436 0.25 1.0 0.50 4.0 0.75 5.0 Name: dia_desde, dtype: float64 ******* Mínimo: 0 Máximo: 6
El 75% de las observaciones es menor a 5: : Esto nos indica que el 75% de la disponibilidad de la muestra tomada se indica para los dias Viernes, Lunes, Sabado, domingo, jueves y martes.
El valor máximo de la columna es 6 es cual corresponde al dia Miercoles
print('Conteo:',dfa['dia_hasta'].count(),'Registros')
print('Promedio:',dfa['dia_hasta'].mean())
print('STD:',dfa['dia_hasta'].std())
print(dfa['dia_hasta'].quantile([.25, .5, .75]))
print('*******')
print('Mínimo:',min(dfa['dia_hasta']))
print('Máximo:',max(dfa['dia_hasta']))
Conteo: 597 Registros Promedio: 3.1892797319932997 STD: 2.019872491774694 0.25 1.0 0.50 4.0 0.75 5.0 Name: dia_hasta, dtype: float64 ******* Mínimo: 0 Máximo: 6
El 75% de las observaciones es menor a 5: : Esto nos indica que el 75% de la disponibilidad final de la muestra tomada se indica para los dias Viernes, Lunes, Sabado, domingo, jueves y martes.
El valor máximo de la columna es 6 es cual corresponde al dia Miercoles.
agrupamientoxdia = dfa.groupby('dia_desde')['contador'].count()
agrupamientoxdia
dia_desde 0 80 1 111 2 55 3 48 4 90 5 111 6 102 Name: contador, dtype: int64
tipos = ["Viernes","Lunes","Sabado", "Domingo", "Jueves", "Martes", "Miercoles"]
count= dfa['dia_desde'].value_counts()
agrupamientoxdia.plot(kind='bar', xlabel=tipos, title='Distribucion de disponibilidad por dia inicial', figsize=(10,9));
tipos = ["Lunes","Martes","Miercoles", "Jueves", "Viernes", "Sabado", "Domingo"]
#tipos = dfa['dia'].unique()
total = dfa['dia_desde'].value_counts().tolist()
desfase = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1)
plt.figure(figsize=(10,7))
plt.pie(total, labels=tipos, autopct='%1.1f%%', shadow=True, startangle=90, explode=desfase)
plt.axis("equal")
plt.show()
Los dias Lunes y Martes son los dias de la semana con una mayor cantidad de registros de disponibilidad inicial de la muestra seleccionada.
De lunes a Viernes se llevan la gran mayoria de registros disponibilidad inicial en la muestra seleccionada.
Los dias sabado y domingo son los dias de menor cantidad de registros de disponibilidad inicial en la muestra seleccionada.
agrupamientoxdia = dfa.groupby('dia_hasta')['contador'].count()
agrupamientoxdia
dia_hasta 0 86 1 78 2 63 3 55 4 122 5 111 6 82 Name: contador, dtype: int64
tipos = ["Viernes","Lunes","Sabado", "Domingo", "Jueves", "Martes", "Miercoles"]
count= dfa['dia_hasta'].value_counts()
agrupamientoxdia.plot(kind='bar', xlabel=tipos, title='Distribucion de disponibilidad por dia final', figsize=(10,9));
tipos = ["Jueves", "Martes","Viernes","Miercoles", "Lunes","Sabado", "Domingo"]
#tipos = dfa['dia'].unique()
total = dfa['dia_hasta'].value_counts().tolist()
desfase = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1)
plt.figure(figsize=(10,5))
plt.pie(total, labels=tipos, autopct='%1.1f%%', shadow=True, startangle=90, explode=desfase)
plt.axis("equal")
plt.show()
Los dias Martes y Jueves son los dias de la semana con una mayor cantidad de registros de disponibilidad final de la muestra seleccionada.
De lunes a Viernes se llevan la gran mayoria de registros disponibilidad final en la muestra seleccionada.
Los dias sabado y domingo son los dias de menor cantidad de registros de disponibilidad final en la muestra seleccionada.
Los dias Lunes y Martes son los dias de la semana de mayor registro de inicios de disponibilidad de Transportistas.
Los dias Martes y Jueves son los dias de la semana de mayor registro de finalizacion de disponibilidad de Transportistas.
En las dos agrupaciones se interpreta una baja de registros de disponibilidad tanto inicial como final para los dias sabados y domingos.
En las dos agrupaciones se interpreta que los registros de disponibilidad tanto inicial como final en la muestra seleccionada en su gran mayoria oscilan entre lunes a viernes.
groupingperhour = dfa.groupby('hora_desde')['contador'].count()
grouping = pd.DataFrame(groupingperhour)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| hora_desde | |
| 0 | 28 |
| 1 | 7 |
| 2 | 2 |
| 3 | 2 |
| 4 | 3 |
| 5 | 8 |
| 6 | 10 |
| 7 | 18 |
| 8 | 45 |
| 9 | 46 |
| 10 | 46 |
| 11 | 37 |
| 12 | 40 |
| 13 | 32 |
| 14 | 41 |
| 15 | 33 |
| 16 | 30 |
| 17 | 35 |
| 18 | 22 |
| 19 | 15 |
| 20 | 23 |
| 21 | 24 |
| 22 | 27 |
| 23 | 23 |
plt.figure(figsize=(10,10))
groupingperhour.plot(kind='bar',grid=True, title='Distribucion de disponibilidad por horario de inicio');
tipos = ["9 AM","10 AM","8 AM", "14 PM","12 PM","11 AM","17 PM","15 PM", "13 PM", "16 PM","0 AM","22 PM", "21 PM", "20 PM", "23 PM", "18 PM", "7 AM", "19 PM", "6 AM", "5 AM", "1 AM", "4 AM", "2 AM", "3 AM"]
#tipos = dfa['hora'].unique()
total = dfa['hora_desde'].value_counts().tolist()
desfase = (0.1,0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8)
plt.figure(figsize=(10,10))
plt.pie(total, labels=tipos, autopct='%1.1f%%', shadow=True, startangle=90, explode=desfase)
plt.title('Distribución porcentual de disponibilidad por horario de inicio', fontsize=20)
plt.axis("equal")
plt.show()
groupingperhour = dfa.groupby('hora_hasta')['contador'].count()
grouping = pd.DataFrame(groupingperhour)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| hora_hasta | |
| 0 | 108 |
| 1 | 8 |
| 2 | 2 |
| 3 | 1 |
| 4 | 1 |
| 5 | 2 |
| 6 | 1 |
| 7 | 8 |
| 8 | 13 |
| 9 | 16 |
| 10 | 22 |
| 11 | 23 |
| 12 | 35 |
| 13 | 15 |
| 14 | 27 |
| 15 | 32 |
| 16 | 25 |
| 17 | 35 |
| 18 | 36 |
| 19 | 25 |
| 20 | 37 |
| 21 | 36 |
| 22 | 38 |
| 23 | 51 |
plt.figure(figsize=(10,10))
groupingperhour.plot(kind='bar',grid=True, title='Distribucion de disponibilidad por horario de finalizacion');
tipos = ["0 AM","23 PM","22 PM", "20 PM","21 PM","18 PM","12 PM","17 PM", "15 PM", "14 PM","16 PM","19 PM", "11 AM", "10 AM", "9 AM", "13 PM", "8 AM", "7 AM", "1 AM", "2 AM", "5 AM", "3 AM", "4 AM", "6 AM"]
#tipos = dfa['hora'].unique()
total = dfa['hora_hasta'].value_counts().tolist()
desfase = (0.1,0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8)
plt.figure(figsize=(10,10))
plt.pie(total, labels=tipos, autopct='%1.1f%%', shadow=True, startangle=90, explode=desfase)
plt.title('Distribución porcentual de disponibilidad por horario de finalizacion', fontsize=20)
plt.axis("equal")
plt.show()
dfa['Comuna'].describe()
count 597 unique 131 top Santiago freq 61 Name: Comuna, dtype: object
groupingpercommune = dfa.groupby('Comuna')['contador'].count()
grouping = pd.DataFrame(groupingpercommune)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| Comuna | |
| Alto Hospicio | 4 |
| Antofagasta | 23 |
| Arauco | 1 |
| Arica | 6 |
| Buin | 7 |
| ... | ... |
| Villarrica | 2 |
| Vitacura | 1 |
| Viña del Mar | 5 |
| Yerbas Buenas | 1 |
| Ñuñoa | 5 |
131 rows × 1 columns
plt.figure(figsize=(27,10))
groupingpercommune.plot(kind='bar', title='Distribucion de disponibilidad por comuna');
| N° | Comunas |
|---|---|
| 1 | Santiago |
| 2 | Puerto Montt |
| 3 | Puente Alto |
| 4 | Antofagasta |
| 5 | Maipú |
print('Conteo:',dfa['Region'].count(),'Registros')
print('Promedio:',dfa['Region'].mean())
print('STD:',dfa['Region'].std())
print(dfa['Region'].quantile([.25, .5, .75]))
print('*******')
print('Mínimo:',min(dfa['Region']))
print('Máximo:',max(dfa['Region']))
Conteo: 597 Registros Promedio: 9.871021775544389 STD: 3.991826522756226 0.25 7 0.50 13 0.75 13 Name: Region, dtype: object ******* Mínimo: 1 Máximo: 16
El 75% de las observaciones es menor a 13: : Esto nos indica que el 75% de la disponibilidad de la muestra tomada se indica entre la Region de Tarapacá y la region region metropolitana.
El valor máximo de la columna es 16 es cual corresponde a la region de Ñuble.
groupingperregion = dfa.groupby('Region')['contador'].count()
grouping = pd.DataFrame(groupingperregion)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| Region | |
| 1 | 9 |
| 2 | 39 |
| 3 | 6 |
| 4 | 24 |
| 5 | 41 |
| 6 | 23 |
| 7 | 27 |
| 8 | 42 |
| 9 | 27 |
| 10 | 45 |
| 11 | 5 |
| 12 | 2 |
| 13 | 278 |
| 14 | 10 |
| 15 | 6 |
| 16 | 13 |
groupingperregion.plot(kind='bar', title='Distribucion de disponibilidad por region', figsize=(10,10));
tipos = ["Región Metropolitana de Santiago","X - Región de Los Lagos","VIII - Región del Bío Bío", "V - Valparaíso", "II - Antofagasta","IX - Región de la Araucanía", "VII - Región del Maule","IV - Coquimbo", "VI - Región de OHiggins","XVI - Región de Ñuble","XIV - Región de Los Ríos", "I - Tarapacá", "III - Atacama", "XV - Arica y Parinacota", "XI - Región de Aisén", "XII - Región de Magallanes"]
#tipos = dfa['region'].unique()
total = dfa['Region'].value_counts().tolist()
desfase = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8)
plt.figure(figsize=(5,10))
plt.pie(total, labels=tipos, autopct='%1.1f%%', shadow=True, startangle=90, explode=desfase)
plt.title('Distribución porcentual de requerimientos por region', fontsize=20)
plt.axis("equal")
plt.show()
| N° | Region |
|---|---|
| 13 | Región Metropolitana de Santiago |
| 10 | X - Región de Los Lagos |
| 8 | VIII - Región del Bío Bío |
| 5 | V - Valparaíso |
| 2 | II - Antofagasta |
groupingpersantiago = dfa[dfa['Region']== 13]['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 278 |
groupingpersantiago = dfa[dfa['Region']== 13]['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 52 |
| 1 | 52 |
| 6 | 47 |
| 4 | 47 |
| 0 | 40 |
| 2 | 23 |
| 3 | 17 |
plt.figure(figsize=(10,7))
tipos = ["Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 13]['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e62f2bb0>, <matplotlib.patches.Wedge at 0x299e65204c0>, <matplotlib.patches.Wedge at 0x299e6520cd0>, <matplotlib.patches.Wedge at 0x299e652f520>, <matplotlib.patches.Wedge at 0x299e652fd30>, <matplotlib.patches.Wedge at 0x299e653e580>, <matplotlib.patches.Wedge at 0x299e653ed90>], [Text(-0.6652741804538365, 0.9987042929824006, 'Lunes'), Text(-1.1779238653943627, -0.22911867521964152, 'Martes'), Text(-0.30839922164508166, -1.1596938906835321, 'Miercoles'), Text(0.8627889320827448, -0.8340235360441076, 'Jueves'), Text(1.172445071326334, 0.25568057165648683, 'Viernes'), Text(0.7206127497519692, 0.9595401319876653, 'Sabado'), Text(0.22911875793353537, 1.1779238493056308, 'Domingo')], [Text(-0.38807660526473786, 0.5825775042397336, '18.7%'), Text(-0.6871222548133782, -0.13365256054479088, '18.7%'), Text(-0.17989954595963092, -0.676488102898727, '16.9%'), Text(0.5032935437149344, -0.4865137293590628, '16.9%'), Text(0.6839262916070281, 0.14914700013295062, '14.4%'), Text(0.42035743735531533, 0.5597317436594713, '8.3%'), Text(0.13365260879456226, 0.6871222454282845, '6.1%')])
El lunes y Martes son los dias iniciales con mayor frecuencia de disponibilidad en la region metropolitana.
La distribucion porcentual nos muestra que entre el miercoles y jueves se distribuyen de manera similiar la frecuencia de disponibilidad inicial en la region metropolitana.
El dia viernes es el dia habil con con la menor frecuencia diaria inicial de disponibilidad.
La distribucion porcentual nos muestra que los dias sabado y domingo, son los dias de disponibilidad inicial con una menor frecuencia.
groupingpersantiago = dfa[dfa['Region']== 13]['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 278 |
groupingpersantiago = dfa[dfa['Region']== 13]['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 4 | 61 |
| 5 | 55 |
| 0 | 41 |
| 1 | 34 |
| 6 | 33 |
| 3 | 28 |
| 2 | 26 |
plt.figure(figsize=(10,7))
tipos = ["Jueves", "Martes", "Viernes","Lunes","Miercoles", "Domingo","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 13]['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6a2e070>, <matplotlib.patches.Wedge at 0x299e6a2e940>, <matplotlib.patches.Wedge at 0x299e6a3b190>, <matplotlib.patches.Wedge at 0x299e6a3b9a0>, <matplotlib.patches.Wedge at 0x299e6a4c1f0>, <matplotlib.patches.Wedge at 0x299e6a4ca00>, <matplotlib.patches.Wedge at 0x299e6a59250>], [Text(-0.7632357183614102, 0.9259974288394878, 'Jueves'), Text(-1.0910456953513041, -0.49961914560531917, 'Martes'), Text(-0.0677680871090001, -1.198084924523127, 'Viernes'), Text(0.8533090290795742, -0.8437201555559015, 'Lunes'), Text(1.1996935189276345, -0.027119377629842418, 'Miercoles'), Text(0.9430096596576785, 0.7421137256460829, 'Domingo'), Text(0.34753051892321807, 1.148574132747625, 'Sabado')], [Text(-0.4452208357108226, 0.5401651668230345, '21.9%'), Text(-0.6364433222882607, -0.2914445016031028, '19.8%'), Text(-0.03953138414691673, -0.6988828726384907, '14.7%'), Text(0.4977636002964182, -0.4921700907409425, '12.2%'), Text(0.6998212193744533, -0.01581963695074141, '11.9%'), Text(0.5500889681336458, 0.4328996732935483, '10.1%'), Text(0.20272613603854384, 0.6700015774361145, '9.4%')])
El Jueves y Martes son los dias finales con mayor frecuencia de disponibilidad en la region metropolitana.
La distribucion porcentual nos muestra que entre el Lunes y Miercoles se distribuyen de manera muy similiar la frecuencia de disponibilidad final en la region metropolitana.
El dia Miercoles es el dia habil con con la menor frecuencia diaria final de disponibilidad en la region metropolitana.
La distribucion porcentual nos muestra que los dias sabado y domingo, son los dias de disponibilidad final con una menor frecuencia.
El lunes y Martes son los dias iniciales con mayor frecuencia de disponibilidad en la region metropolitana.
El Jueves y Martes son los dias finales con mayor frecuencia de disponibilidad en la region metropolitana
La distribucion porcentual nos muestra que entre el miercoles y jueves se distribuyen de manera similiar la frecuencia de disponibilidad inicial en la region metropolitana.
La distribucion porcentual nos muestra que entre el Lunes y Miercoles se distribuyen de manera muy similiar la frecuencia de disponibilidad final en la region metropolitana.
El dia viernes es el dia habil con con la menor frecuencia diaria inicial de disponibilidad.
El dia Miercoles es el dia habil con con la menor frecuencia diaria final de disponibilidad en la region metropolitana.
La distribucion porcentual nos muestra que los dias sabado y domingo, son los dias de disponibilidad inicial con una menor frecuencia.
La distribucion porcentual nos muestra que los dias sabado y domingo, son los dias de disponibilidad final con una menor frecuencia.
Podemos inferir que los fines de semana en la region metropolitana son los dias de menor cantidad de transportistas disponibles para servicios.
groupingperloslagos = dfa[dfa['Region']== 10]['contador'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 45 |
groupingperloslagos = dfa[dfa['Region']== 10]['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 10 |
| 6 | 9 |
| 0 | 8 |
| 4 | 6 |
| 2 | 6 |
| 1 | 4 |
| 3 | 2 |
plt.figure(figsize=(10,7))
tipos = [ "Martes", "Miercoles","Viernes", "Jueves", "Sabado","Lunes", "Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 13]['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6a97580>, <matplotlib.patches.Wedge at 0x299e6a97e50>, <matplotlib.patches.Wedge at 0x299e6aa56a0>, <matplotlib.patches.Wedge at 0x299e6aa5eb0>, <matplotlib.patches.Wedge at 0x299e6ab4700>, <matplotlib.patches.Wedge at 0x299e6ab4f10>, <matplotlib.patches.Wedge at 0x299e6ac3760>], [Text(-0.6652741804538365, 0.9987042929824006, 'Martes'), Text(-1.1779238653943627, -0.22911867521964152, 'Miercoles'), Text(-0.30839922164508166, -1.1596938906835321, 'Viernes'), Text(0.8627889320827448, -0.8340235360441076, 'Jueves'), Text(1.172445071326334, 0.25568057165648683, 'Sabado'), Text(0.7206127497519692, 0.9595401319876653, 'Lunes'), Text(0.22911875793353537, 1.1779238493056308, 'Domingo')], [Text(-0.38807660526473786, 0.5825775042397336, '18.7%'), Text(-0.6871222548133782, -0.13365256054479088, '18.7%'), Text(-0.17989954595963092, -0.676488102898727, '16.9%'), Text(0.5032935437149344, -0.4865137293590628, '16.9%'), Text(0.6839262916070281, 0.14914700013295062, '14.4%'), Text(0.42035743735531533, 0.5597317436594713, '8.3%'), Text(0.13365260879456226, 0.6871222454282845, '6.1%')])
El Martes y Miercoles son los dias iniciales con mayor frecuencia de disponibilidad en la region de los lagos.
La distribucion porcentual nos muestra que entre el Jueves y Viernes se distribuyen de manera similiar la frecuencia de disponibilidad inicial de la muestra en la region de los lagos.
De la muestra seleccionada el dia lunes es el dia habil con la menor frecuencia diaria inicial de disponibilidad en la region de los lagos.
La distribucion porcentual nos muestra que los dias Lunes y Domingo, son los dias de disponibilidad inicial con una menor frecuencia.
groupingperloslagos = dfa[dfa['Region']== 10]['contador'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 45 |
groupingperloslagos = dfa[dfa['Region']== 10]['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 9 |
| 4 | 8 |
| 1 | 8 |
| 5 | 7 |
| 2 | 7 |
| 6 | 6 |
plt.figure(figsize=(10,7))
tipos = ["Viernes","Jueves","Lunes", "Martes", "Miercoles","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 10]['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6248520>, <matplotlib.patches.Wedge at 0x299e622ed60>, <matplotlib.patches.Wedge at 0x299e622e190>, <matplotlib.patches.Wedge at 0x299e62bfcd0>, <matplotlib.patches.Wedge at 0x299e5bc9f10>, <matplotlib.patches.Wedge at 0x299e5bd1ee0>], [Text(-0.705342311840444, 0.9708203866460459, 'Viernes'), Text(-1.1643548621690454, -0.29030631226913334, 'Jueves'), Text(-0.24949395937991276, -1.1737771356747986, 'Lunes'), Text(0.8917738632451628, -0.8029566469198682, 'Martes'), Text(1.1643548349886017, 0.2903064212839017, 'Miercoles'), Text(0.48808379036248134, 1.0962546299037434, 'Sabado')], [Text(-0.41144968190692566, 0.5663118922101934, '20.0%'), Text(-0.679207002931943, -0.16934534882366112, '17.8%'), Text(-0.14553814297161577, -0.6847033291436325, '17.8%'), Text(0.520201420226345, -0.46839137736992315, '15.6%'), Text(0.6792069870766843, 0.1693454124156093, '15.6%'), Text(0.2847155443781141, 0.6394818674438503, '13.3%')])
De la muestra seleccionada los dias Jueves y Viernes son los dias finales con mayor frecuencia de disponibilidad en la region de los lagos.
La distribucion porcentual nos muestra que entre el Martes y Miercoles se distribuyen de manera similiar la frecuencia de disponibilidad final en la region de los lagos.
El dia Miercoles es el dia habil con con la menor frecuencia diaria final de disponibilidad en la region de los lagos.
La distribucion porcentual nos muestra que el dia sabado es el dia de disponibilidad final con una menor frecuencia.
La muestra seleccionada nos muestra que el dia domingo no registra disponibilidad diaria final para la region de los lagos.
groupingperbiobio = dfa[dfa['Region']== 8]['contador'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 42 |
groupingperbiobio = dfa[dfa['Region']== 8]['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 8 |
| 0 | 8 |
| 1 | 7 |
| 5 | 6 |
| 3 | 6 |
| 4 | 4 |
| 2 | 3 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles", "Viernes", "Lunes", "Martes", "Domingo", "Jueves", "Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 8]['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e61ffa30>, <matplotlib.patches.Wedge at 0x299e62186a0>, <matplotlib.patches.Wedge at 0x299e6218580>, <matplotlib.patches.Wedge at 0x299e61e7f10>, <matplotlib.patches.Wedge at 0x299e61e7df0>, <matplotlib.patches.Wedge at 0x299e620c130>, <matplotlib.patches.Wedge at 0x299e6220520>], [Text(-0.6759840807274973, 0.9914865216446467, 'Miercoles'), Text(-1.1699134856893678, -0.26702515986729347, 'Viernes'), Text(-0.2670250503320875, -1.1699135106900622, 'Lunes'), Text(0.8162073696459731, -0.8796621679574507, 'Martes'), Text(1.1966445444230935, 0.08967627502549137, 'Domingo'), Text(0.816207143156177, 0.8796623781092562, 'Jueves'), Text(0.26702491341307505, 1.1699135419409163, 'Sabado')], [Text(-0.3943240470910401, 0.5783671376260439, '19.0%'), Text(-0.6824495333187978, -0.1557646765892545, '19.0%'), Text(-0.15576461269371772, -0.6824495479025363, '16.7%'), Text(0.47612096562681755, -0.5131362646418461, '14.3%'), Text(0.6980426509134711, 0.052311160431536635, '14.3%'), Text(0.4761208335077699, 0.5131363872303994, '9.5%'), Text(0.15576453282429378, 0.6824495661322011, '7.1%')])
groupingperbiobio = dfa[dfa['Region']== 8]['contador'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 42 |
groupingperbiobio = dfa[dfa['Region']== 8]['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 8 |
| 4 | 7 |
| 0 | 7 |
| 2 | 6 |
| 1 | 6 |
| 6 | 5 |
| 3 | 3 |
plt.figure(figsize=(10,7))
tipos = ["Martes", "Jueves", "Viernes","Sabado" ,"Lunes","Miercoles", "Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 8]['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e60ebe80>, <matplotlib.patches.Wedge at 0x299e60eb7c0>, <matplotlib.patches.Wedge at 0x299e6091100>, <matplotlib.patches.Wedge at 0x299e6091be0>, <matplotlib.patches.Wedge at 0x299e60d3bb0>, <matplotlib.patches.Wedge at 0x299e64b6550>, <matplotlib.patches.Wedge at 0x299e64b6b20>], [Text(-0.6759840807274973, 0.9914865216446467, 'Martes'), Text(-1.1865969846923292, -0.17885076437933503, 'Jueves'), Text(-0.43840915204551856, -1.1170485286695155, 'Viernes'), Text(0.6759841735571623, -0.9914864583544449, 'Sabado'), Text(1.1966445696113426, -0.08967593891164445, 'Lunes'), Text(0.8796621106433115, 0.8162074314159082, 'Miercoles'), Text(0.26702491341307505, 1.1699135419409163, 'Domingo')], [Text(-0.3943240470910401, 0.5783671376260439, '19.0%'), Text(-0.6921815744038586, -0.1043296125546121, '16.7%'), Text(-0.2557386720265525, -0.6516116417238841, '16.7%'), Text(0.394324101241678, -0.5783671007067595, '14.3%'), Text(0.6980426656066164, -0.05231096436512593, '14.3%'), Text(0.5131362312085983, 0.47612100165927973, '11.9%'), Text(0.15576453282429378, 0.6824495661322011, '7.1%')])
groupingpervalpo = dfa[dfa['Region']== 5]['contador'].value_counts()
grouping = pd.DataFrame(groupingpervalpo)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 41 |
groupingpervalpo = dfa[dfa['Region']== 5]['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingpervalpo)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 9 |
| 1 | 9 |
| 4 | 8 |
| 5 | 6 |
| 0 | 4 |
| 3 | 3 |
| 2 | 2 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles", "Lunes", "Jueves", "Martes", "Viernes", "Domingo", "Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 5]['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e64a20a0>, <matplotlib.patches.Wedge at 0x299e64dd280>, <matplotlib.patches.Wedge at 0x299e64ddbb0>, <matplotlib.patches.Wedge at 0x299e61857f0>, <matplotlib.patches.Wedge at 0x299e61403a0>, <matplotlib.patches.Wedge at 0x299e6140040>, <matplotlib.patches.Wedge at 0x299e5ff9880>], [Text(-0.7634909286777637, 0.9257870175298237, 'Miercoles'), Text(-1.0542147050204111, -0.5732637749925663, 'Lunes'), Text(0.2734241733287824, -1.168434517394737, 'Jueves'), Text(1.1571041716707475, -0.3179778858696835, 'Martes'), Text(1.0542147586932349, 0.5732636762898595, 'Viernes'), Text(0.6132225395878125, 1.031483454516588, 'Domingo'), Text(0.18317930084528214, 1.1859364838564643, 'Sabado')], [Text(-0.44536970839536216, 0.5400424268923971, '22.0%'), Text(-0.6149585779285731, -0.33440386874566363, '22.0%'), Text(0.15949743444178968, -0.6815868018135967, '19.5%'), Text(0.6749774334746026, -0.18548710009064867, '14.6%'), Text(0.6149586092377203, 0.33440381116908474, '9.8%'), Text(0.3577131480928906, 0.6016986818013429, '7.3%'), Text(0.10685459215974791, 0.6917962822496042, '4.9%')])
groupingpervalpo = dfa[dfa['Region']== 5]['contador'].value_counts()
grouping = pd.DataFrame(groupingpervalpo)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 41 |
groupingpervalpo = dfa[dfa['Region']== 5]['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingpervalpo)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 4 | 13 |
| 5 | 6 |
| 6 | 5 |
| 2 | 5 |
| 0 | 5 |
| 3 | 4 |
| 1 | 3 |
plt.figure(figsize=(10,7))
tipos = ["Jueves", "Martes", "Miercoles","Sabado","Viernes", "Domingo","Lunes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 5]['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e647c430>, <matplotlib.patches.Wedge at 0x299e647ce80>, <matplotlib.patches.Wedge at 0x299e5f3d100>, <matplotlib.patches.Wedge at 0x299e5f30b50>, <matplotlib.patches.Wedge at 0x299e5f301f0>, <matplotlib.patches.Wedge at 0x299e5fa8ca0>, <matplotlib.patches.Wedge at 0x299e5f4b790>], [Text(-1.0072385024211261, 0.6522810738021205, 'Jueves'), Text(-0.7634909720169811, -0.9257869817882327, 'Martes'), Text(0.18317907877450326, -1.1859365181574115, 'Miercoles'), Text(0.9543514206095608, -0.727470525850026, 'Sabado'), Text(1.1920825099114754, 0.13762009142257495, 'Viernes'), Text(0.8321190167462258, 0.8646258971192654, 'Domingo'), Text(0.27342425537633347, 1.1684344981948702, 'Lunes')], [Text(-0.5875557930789901, 0.380497293051237, '31.7%'), Text(-0.4453697336765723, -0.5400424060431357, '14.6%'), Text(0.10685446261846024, -0.69179630225849, '12.2%'), Text(0.556704995355577, -0.42435780674584844, '12.2%'), Text(0.6953814641150271, 0.08027838666316872, '12.2%'), Text(0.4854027597686317, 0.5043651066529048, '9.8%'), Text(0.1594974823028612, 0.6815867906136741, '7.3%')])
El Jueves y Martes son los dias finales con mayor frecuencia de disponibilidad en la region de valparaiso.
La distribucion porcentual nos muestra que entre el Miercoles, Viernes y Sabado se distribuye de manera similiar la frecuencia de disponibilidad final en la region de valparaiso.
El dia Lunes es el dia habil con con la menor frecuencia diaria final de disponibilidad en la region de valparaiso.
La distribucion porcentual nos muestra que los dias Domingo y Lunes, son los dias de disponibilidad final con una menor frecuencia.
groupingperantofagasta = dfa[dfa['Region']== 2]['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 39 |
groupingperantofagasta = dfa[dfa['Region']== 2]['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 10 |
| 1 | 7 |
| 4 | 6 |
| 3 | 6 |
| 6 | 5 |
| 2 | 4 |
| 0 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Martes", "Lunes", "Jueves", "Domingo", "Miercoles", "Sabado", "Viernes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 5]['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e651d070>, <matplotlib.patches.Wedge at 0x299e651d430>, <matplotlib.patches.Wedge at 0x299e64e3e80>, <matplotlib.patches.Wedge at 0x299e64e38b0>, <matplotlib.patches.Wedge at 0x299e60f33d0>, <matplotlib.patches.Wedge at 0x299e60f3430>, <matplotlib.patches.Wedge at 0x299e600ceb0>], [Text(-0.7634909286777637, 0.9257870175298237, 'Martes'), Text(-1.0542147050204111, -0.5732637749925663, 'Lunes'), Text(0.2734241733287824, -1.168434517394737, 'Jueves'), Text(1.1571041716707475, -0.3179778858696835, 'Domingo'), Text(1.0542147586932349, 0.5732636762898595, 'Miercoles'), Text(0.6132225395878125, 1.031483454516588, 'Sabado'), Text(0.18317930084528214, 1.1859364838564643, 'Viernes')], [Text(-0.44536970839536216, 0.5400424268923971, '22.0%'), Text(-0.6149585779285731, -0.33440386874566363, '22.0%'), Text(0.15949743444178968, -0.6815868018135967, '19.5%'), Text(0.6749774334746026, -0.18548710009064867, '14.6%'), Text(0.6149586092377203, 0.33440381116908474, '9.8%'), Text(0.3577131480928906, 0.6016986818013429, '7.3%'), Text(0.10685459215974791, 0.6917962822496042, '4.9%')])
El dia viernes es el dia habil con con la menor frecuencia diaria inicial de disponibilidad.
La distribucion porcentual nos muestra que los dias Viernes y Sabado, son los dias de disponibilidad inicial con una menor frecuencia.
De la muestra seleccionada, los dias iniciales con la mayor frecuencia de disponibilidad son Lunes, Martes, Miercoles, Jueves y Domingo.
groupingperantofagasta = dfa[dfa['Region']== 2]['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 39 |
groupingperantofagasta = dfa[dfa['Region']== 2]['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 11 |
| 4 | 9 |
| 6 | 5 |
| 3 | 5 |
| 1 | 5 |
| 2 | 2 |
| 0 | 2 |
plt.figure(figsize=(10,7))
tipos = ["Martes", "Jueves", "Miercoles","Domingo","Lunes", "Sabado","Viernes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Region']== 2]['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6851eb0>, <matplotlib.patches.Wedge at 0x299e66597f0>, <matplotlib.patches.Wedge at 0x299e6659b50>, <matplotlib.patches.Wedge at 0x299e666e730>, <matplotlib.patches.Wedge at 0x299e666e190>, <matplotlib.patches.Wedge at 0x299e66362b0>, <matplotlib.patches.Wedge at 0x299e65b1580>], [Text(-0.929525985166562, 0.7589344127789519, 'Martes'), Text(-0.7208906353271789, -0.9593313775216449, 'Jueves'), Text(0.5576679250666874, -1.0625471685303272, 'Miercoles'), Text(1.1526217864555781, -0.33386077545580584, 'Domingo'), Text(1.0392303628265211, 0.6000002108161774, 'Lunes'), Text(0.5576675644413407, 1.0625473578010833, 'Sabado'), Text(0.19249326227443989, 1.1844603598174757, 'Viernes')], [Text(-0.5422234913471611, 0.4427117407877219, '28.2%'), Text(-0.4205195372741876, -0.5596099702209595, '23.1%'), Text(0.3253062896222343, -0.6198191816426908, '12.8%'), Text(0.6723627087657538, -0.19475211901588674, '12.8%'), Text(0.606217711648804, 0.3500001229761034, '12.8%'), Text(0.32530607925744875, 0.6198192920506318, '5.1%'), Text(0.1122877363267566, 0.6909352098935273, '5.1%')])
groupingperstgo = dfa[dfa['Comuna']== 'Santiago']['contador'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 61 |
groupingperstgo = dfa[dfa['Comuna']== 'Santiago']['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 14 |
| 1 | 12 |
| 6 | 10 |
| 0 | 9 |
| 4 | 8 |
| 3 | 4 |
| 2 | 4 |
plt.figure(figsize=(10,7))
tipos = ["Martes","Lunes","Miercoles","Viernes","Jueves","Domingo","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Santiago']['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6629130>, <matplotlib.patches.Wedge at 0x299e65e4a00>, <matplotlib.patches.Wedge at 0x299e65aa550>, <matplotlib.patches.Wedge at 0x299e65aadc0>, <matplotlib.patches.Wedge at 0x299e6681160>, <matplotlib.patches.Wedge at 0x299e66817f0>, <matplotlib.patches.Wedge at 0x299e6227c70>], [Text(-0.7921825295873827, 0.9013583304194486, 'Martes'), Text(-1.05921457010935, -0.5639720688722669, 'Lunes'), Text(0.06177448825015575, -1.1984089087625442, 'Miercoles'), Text(1.0287775470544447, -0.6177513728650385, 'Viernes'), Text(1.133387084222342, 0.3942508304594655, 'Jueves'), Text(0.6953053756397518, 0.9780339639329833, 'Domingo'), Text(0.2454625758062397, 1.1746268019582076, 'Sabado')], [Text(-0.4621064755926399, 0.525792359411345, '23.0%'), Text(-0.6178751658971209, -0.32898370684215567, '19.7%'), Text(0.03603511814592419, -0.6990718634448173, '16.4%'), Text(0.6001202357817594, -0.36035496750460577, '14.8%'), Text(0.661142465796366, 0.22997965110135485, '13.1%'), Text(0.40559480245652185, 0.5705198122942402, '6.6%'), Text(0.14318650255363982, 0.6851989678089543, '6.6%')])
groupingperstgo = dfa[dfa['Comuna']== 'Santiago']['contador'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 61 |
groupingperstgo = dfa[dfa['Comuna']== 'Santiago']['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 16 |
| 4 | 12 |
| 1 | 8 |
| 6 | 7 |
| 0 | 7 |
| 2 | 6 |
| 3 | 5 |
plt.figure(figsize=(10,7))
tipos = ["Martes","Jueves","Lunes","Miercoles","Viernes","Sabado","Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Santiago']['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e5fdaf10>, <matplotlib.patches.Wedge at 0x299e5fd6820>, <matplotlib.patches.Wedge at 0x299e5fde130>, <matplotlib.patches.Wedge at 0x299e5fdea30>, <matplotlib.patches.Wedge at 0x299e61c2340>, <matplotlib.patches.Wedge at 0x299e61c2c10>, <matplotlib.patches.Wedge at 0x299e61dd520>], [Text(-0.8806624021852977, 0.8151280472276863, 'Martes'), Text(-0.9214565965970928, -0.7687117408936219, 'Jueves'), Text(0.18466858467091046, -1.1857054920323356, 'Lunes'), Text(0.9598070058006143, -0.7202572537753852, 'Miercoles'), Text(1.196421044602315, 0.0926103883627874, 'Viernes'), Text(0.8806625548208737, 0.8151278823205422, 'Sabado'), Text(0.30560550414393794, 1.1604332276511775, 'Domingo')], [Text(-0.5137197346080903, 0.47549136088281696, '26.2%'), Text(-0.5375163480149707, -0.4484151821879461, '19.7%'), Text(0.1077233410580311, -0.6916615370188623, '13.1%'), Text(0.5598874200503583, -0.42015006470230803, '11.5%'), Text(0.6979122760180169, 0.05402272654495931, '11.5%'), Text(0.5137198236455096, 0.4754912646869829, '9.8%'), Text(0.17826987741729713, 0.6769193827965201, '8.2%')])
El Martes es el dia con la mayor frecuencia de disponibilidad final en la comuna de santiago.
La distribucion nos muestra que la gran mayoria de disponibilidad final de Transportistas en la comuna de santiago se distribuyen entre el lunes y Viernes.
De la muestra seleccionada, la distribucion porcentual nos muestra que el dia miercoles y viernes se distribuyen de manera similiar la frecuencia de disponibilidad final en la comuna de santiago.
El Domingo es el dia con la menor frecuencia de disponibilidad final de transportista para esta comuna.
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 26 |
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 5 |
| 0 | 5 |
| 5 | 4 |
| 1 | 4 |
| 4 | 3 |
| 2 | 3 |
| 3 | 2 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles","Viernes","Martes","Lunes","Jueves","Sabado","Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Puerto Montt']['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e664a040>, <matplotlib.patches.Wedge at 0x299e664a9a0>, <matplotlib.patches.Wedge at 0x299e61392b0>, <matplotlib.patches.Wedge at 0x299e6139b80>, <matplotlib.patches.Wedge at 0x299e616f430>, <matplotlib.patches.Wedge at 0x299e616fb50>, <matplotlib.patches.Wedge at 0x299e614b670>], [Text(-0.6816777067463067, 0.9875806317081641, 'Miercoles'), Text(-1.165130171604009, -0.28717883490607854, 'Viernes'), Text(-0.2871787258187177, -1.165130198491627, 'Martes'), Text(0.7957472772202019, -0.8982128204365798, 'Lunes'), Text(1.1999999999999917, 1.4044013496057818e-07, 'Jueves'), Text(0.8982128018107705, 0.7957472982443897, 'Sabado'), Text(0.28717864400319637, 1.1651302186573333, 'Domingo')], [Text(-0.3976453289353455, 0.5760887018297622, '19.2%'), Text(-0.6796592667690051, -0.16752098702854581, '19.2%'), Text(-0.16752092339425195, -0.6796592824534491, '15.4%'), Text(0.46418591171178436, -0.5239574785880048, '15.4%'), Text(0.6999999999999952, 8.192341206033728e-08, '11.5%'), Text(0.5239574677229495, 0.464185923975894, '11.5%'), Text(0.16752087566853122, 0.6796592942167778, '7.7%')])
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 26 |
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 6 |
| 1 | 6 |
| 0 | 5 |
| 5 | 3 |
| 4 | 3 |
| 2 | 3 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles","Lunes","Viernes","Martes","Jueves","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Puerto Montt']['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6083130>, <matplotlib.patches.Wedge at 0x299e6083a60>, <matplotlib.patches.Wedge at 0x299e65af3a0>, <matplotlib.patches.Wedge at 0x299e65afc70>, <matplotlib.patches.Wedge at 0x299e65d6580>, <matplotlib.patches.Wedge at 0x299e65d6e50>], [Text(-0.795747193123445, 0.8982128949398127, 'Miercoles'), Text(-0.9875806317081641, -0.6816777067463067, 'Lunes'), Text(0.42552589273401614, -1.1220194804961805, 'Viernes'), Text(1.1651301917697232, -0.28717875309055896, 'Martes'), Text(1.0625472076898044, 0.5576678504545516, 'Jueves'), Text(0.42552581394573147, 1.1220195103766346, 'Sabado')], [Text(-0.46418586265534284, 0.523957522048224, '23.1%'), Text(-0.5760887018297625, -0.3976453289353455, '23.1%'), Text(0.24822343742817604, -0.6545113636227718, '19.2%'), Text(0.6796592785323384, -0.16752093930282602, '11.5%'), Text(0.6198192044857191, 0.32530624609848835, '11.5%'), Text(0.24822339146834332, 0.6545113810530369, '11.5%')])
De la muestra seleccionada el Miercoles es el dia con la mayor frecuencia de disponibilidad final en la comuna de Puerto Montt.
La distribucion nos muestra que la gran mayoria de disponibilidad final de Transportistas en la comuna de Puerto Montt se distribuyen entre el lunes y Viernes.
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 17 |
groupingperstgo = dfa[dfa['Comuna']== 'Puente Alto']['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 7 |
| 5 | 2 |
| 4 | 2 |
| 2 | 2 |
| 1 | 2 |
| 3 | 1 |
| 0 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles","Martes","Jueves","Sabado","Lunes","Domingo","Viernes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Puente Alto']['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e62bffa0>, <matplotlib.patches.Wedge at 0x299e61627c0>, <matplotlib.patches.Wedge at 0x299e647c8e0>, <matplotlib.patches.Wedge at 0x299e6adcf40>, <matplotlib.patches.Wedge at 0x299e6499940>, <matplotlib.patches.Wedge at 0x299e60aab20>, <matplotlib.patches.Wedge at 0x299e600c610>], [Text(-1.1541907772332558, 0.3283955690165341, 'Miercoles'), Text(-0.22049938077727382, -1.1795677272106246, 'Martes'), Text(0.6317186333813491, -1.0202605393911894, 'Jueves'), Text(1.1541907849199085, -0.328395542000749, 'Sabado'), Text(1.0741959267956478, 0.5348860727815217, 'Lunes'), Text(0.6317185497981229, 1.0202605911437317, 'Domingo'), Text(0.22049936697238698, 1.1795677297912048, 'Viernes')], [Text(-0.6732779533860658, 0.19156408192631152, '41.2%'), Text(-0.12862463878674305, -0.6880811742061977, '11.8%'), Text(0.36850253613912026, -0.5951519813115271, '11.8%'), Text(0.6732779578699466, -0.19156406616710359, '11.8%'), Text(0.6266142906307945, 0.312016875789221, '11.8%'), Text(0.36850248738223834, 0.59515201150051, '5.9%'), Text(0.12862463073389238, 0.688081175711536, '5.9%')])
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 17 |
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 6 | 4 |
| 5 | 4 |
| 4 | 3 |
| 1 | 3 |
| 0 | 2 |
| 3 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Miercoles","Martes","Jueves","Lunes","Viernes","Domingo"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Puente Alto']['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e5bc22e0>, <matplotlib.patches.Wedge at 0x299e6601370>, <matplotlib.patches.Wedge at 0x299e65af7c0>, <matplotlib.patches.Wedge at 0x299e60f7b50>, <matplotlib.patches.Wedge at 0x299e66896d0>, <matplotlib.patches.Wedge at 0x299e6595280>], [Text(-0.808434774817904, 0.8868106984385815, 'Miercoles'), Text(-0.9576206667621164, -0.7231615715661888, 'Martes'), Text(0.43349002715655394, -1.1189666645418042, 'Jueves'), Text(1.194881017347109, -0.11072196883879024, 'Lunes'), Text(0.8084347125459953, 0.8868107552069235, 'Viernes'), Text(0.22049933936261082, 1.1795677349523648, 'Domingo')], [Text(-0.4715869519771107, 0.5173062407558392, '23.5%'), Text(-0.5586120556112345, -0.4218442500802767, '23.5%'), Text(0.2528691825079898, -0.6527305543160523, '17.6%'), Text(0.6970139267858134, -0.06458781515596096, '17.6%'), Text(0.47158691565183053, 0.5173062738707054, '11.8%'), Text(0.12862461462818964, 0.6880811787222127, '5.9%')])
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 23 |
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 6 |
| 3 | 5 |
| 1 | 5 |
| 4 | 4 |
| 6 | 2 |
| 0 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Martes","Domingo","Lunes","Jueves","Miercoles","Viernes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Antofagasta']['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e63910d0>, <matplotlib.patches.Wedge at 0x299e6391a30>, <matplotlib.patches.Wedge at 0x299e639d340>, <matplotlib.patches.Wedge at 0x299e639dc10>, <matplotlib.patches.Wedge at 0x299e63ac520>, <matplotlib.patches.Wedge at 0x299e63acdf0>], [Text(-0.8770031504653762, 0.8190637790024686, 'Martes'), Text(-0.8770031888085182, -0.8190637379469871, 'Domingo'), Text(0.6235006544810243, -1.0253033374868799, 'Lunes'), Text(1.1749009285744227, 0.24414710326964634, 'Jueves'), Text(0.623500822473713, 1.0253032353282632, 'Miercoles'), Text(0.16340006541934726, 1.1888231233539133, 'Viernes')], [Text(-0.5115851711048027, 0.4777872044181066, '26.1%'), Text(-0.5115851934716356, -0.47778718046907576, '21.7%'), Text(0.36370871511393077, -0.5980936135340131, '21.7%'), Text(0.6853588750017465, 0.14241914357396035, '17.4%'), Text(0.3637088131096659, 0.5980935539414868, '8.7%'), Text(0.09531670482795257, 0.6934801552897826, '4.3%')])
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 23 |
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 5 | 8 |
| 6 | 5 |
| 4 | 5 |
| 3 | 3 |
| 1 | 2 |
plt.figure(figsize=(10,7))
tipos = ["Martes","Miercoles","Jueves","Domingo","Lunes"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Antofagasta']['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e63f96a0>, <matplotlib.patches.Wedge at 0x299e63f9fd0>, <matplotlib.patches.Wedge at 0x299e64068e0>, <matplotlib.patches.Wedge at 0x299e6413220>, <matplotlib.patches.Wedge at 0x299e6413af0>], [Text(-1.0654622733196495, 0.5520780235913443, 'Martes'), Text(-0.32375610422164475, -1.155500750748014, 'Miercoles'), Text(1.0654622474750108, -0.5520780734692321, 'Jueves'), Text(0.9803639082336707, 0.6920163346575015, 'Domingo'), Text(0.3237561853609854, 1.1555007280138354, 'Lunes')], [Text(-0.621519659436462, 0.3220455137616175, '34.8%'), Text(-0.1888577274626261, -0.6740421046030081, '21.7%'), Text(0.621519644360423, -0.322045542857052, '21.7%'), Text(0.5718789464696412, 0.4036761952168758, '13.0%'), Text(0.18885777479390814, 0.6740420913414039, '8.7%')])
El Martes es el dia con la mayor frecuencia de disponibilidad final en la comuna de Antofagasta.
La distribucion nos muestra que la gran mayoria de disponibilidad final de Transportistas en la comuna de santiago se distribuyen entre Martes, Miercoles y Jueves.
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['contador'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 15 |
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['dia_desde'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'dia_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 4 |
| 6 | 3 |
| 4 | 2 |
| 3 | 2 |
| 1 | 2 |
| 5 | 1 |
| 2 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Viernes","Miercoles","Jueves","Domingo","Lunes","Martes","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Maipú']['dia_desde'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e66c4370>, <matplotlib.patches.Wedge at 0x299e66c4cd0>, <matplotlib.patches.Wedge at 0x299e66d25e0>, <matplotlib.patches.Wedge at 0x299e66d2eb0>, <matplotlib.patches.Wedge at 0x299e66df7f0>, <matplotlib.patches.Wedge at 0x299e66ed100>, <matplotlib.patches.Wedge at 0x299e66ed9d0>], [Text(-0.8917738256560485, 0.8029566886668146, 'Viernes'), Text(-0.8917737128886933, -0.8029568139076438, 'Miercoles'), Text(0.2494941791738013, -1.1737770889561574, 'Jueves'), Text(1.0392305875307437, -0.5999998216170612, 'Domingo'), Text(1.141267739701123, 0.370820639012299, 'Lunes'), Text(0.7053420618798191, 0.9708205682530248, 'Martes'), Text(0.24949371211177657, 1.1737771882332209, 'Sabado')], [Text(-0.5202013982993615, 0.4683914017223084, '26.7%'), Text(-0.5202013325184045, -0.4683914747794589, '20.0%'), Text(0.1455382711847174, -0.6847033018910919, '13.3%'), Text(0.6062178427262672, -0.3499998959432856, '13.3%'), Text(0.6657395148256551, 0.21631203942384108, '13.3%'), Text(0.4114495360965611, 0.5663119981475977, '6.7%'), Text(0.14553799873186968, 0.6847033598027121, '6.7%')])
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['contador'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 15 |
groupingperstgo = dfa[dfa['Comuna']== 'Maipú']['dia_hasta'].value_counts()
grouping = pd.DataFrame(groupingperstgo)
grouping = grouping.rename(columns={'dia_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 4 | 4 |
| 1 | 4 |
| 0 | 3 |
| 3 | 2 |
| 6 | 1 |
| 2 | 1 |
plt.figure(figsize=(10,7))
tipos = ["Jueves","Lunes","Viernes","Domingo","Miercoles","Sabado"]
desfase = (0.1, 0.1, 0.1,0.1, 0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Maipú']['dia_hasta'].value_counts()
plt.pie(grafico ,autopct='%1.1f%%', shadow=True, startangle=90, labels = tipos, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e6737490>, <matplotlib.patches.Wedge at 0x299e6737df0>, <matplotlib.patches.Wedge at 0x299e6744700>, <matplotlib.patches.Wedge at 0x299e6744fd0>, <matplotlib.patches.Wedge at 0x299e67548e0>, <matplotlib.patches.Wedge at 0x299e67611f0>], [Text(-0.8917738256560485, 0.8029566886668146, 'Jueves'), Text(-0.7053421754982906, -0.970820485704406, 'Lunes'), Text(0.8917739384233858, -0.80295656342597, 'Viernes'), Text(1.141267739701123, 0.370820639012299, 'Domingo'), Text(0.7053420618798191, 0.9708205682530248, 'Miercoles'), Text(0.24949371211177657, 1.1737771882332209, 'Sabado')], [Text(-0.5202013982993615, 0.4683914017223084, '26.7%'), Text(-0.41144960237400285, -0.5663119499942368, '26.7%'), Text(0.5202014640803083, -0.4683913286651491, '20.0%'), Text(0.6657395148256551, 0.21631203942384108, '13.3%'), Text(0.4114495360965611, 0.5663119981475977, '6.7%'), Text(0.14553799873186968, 0.6847033598027121, '6.7%')])
De la muestra seleccionada el Jueves es el dia con la mayor frecuencia de disponibilidad final en la comuna de Maipú.
La distribucion nos muestra que la gran mayoria de disponibilidad final de Transportistas en la comuna de santiago se distribuyen entre el lunes, Jueves, Viernes y Domingo.
De la muestra seleccionada, la distribucion porcentual nos muestra que el dia Lunes y Jueves, asi tambien los dias Miercoles y Sabado, se distribuyen de manera similiar la frecuencia de disponibilidad final en la comuna de Maipú.
El Sabado es el dia con la menor frecuencia de disponibilidad final de transportista para esta comuna.
groupingpersantiago = dfa[dfa['Region']== 13]['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 278 |
groupingpersantiago = dfa[dfa['Region']== 13]['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'hora_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 10 | 22 |
| 12 | 21 |
| 15 | 20 |
| 9 | 20 |
| 13 | 20 |
| 11 | 19 |
| 8 | 17 |
| 14 | 16 |
| 23 | 14 |
| 16 | 13 |
| 22 | 12 |
| 17 | 11 |
| 20 | 11 |
| 19 | 10 |
| 7 | 10 |
| 0 | 10 |
| 18 | 9 |
| 6 | 8 |
| 21 | 5 |
| 5 | 4 |
| 1 | 3 |
| 4 | 1 |
| 3 | 1 |
| 2 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2)
grafico = dfa[dfa['Region']== 13]['hora_desde'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e7bc7eb0>, <matplotlib.patches.Wedge at 0x299e7bd3820>, <matplotlib.patches.Wedge at 0x299e7be1130>, <matplotlib.patches.Wedge at 0x299e7be1a00>, <matplotlib.patches.Wedge at 0x299e7bef310>, <matplotlib.patches.Wedge at 0x299e7befc10>, <matplotlib.patches.Wedge at 0x299e7bfd520>, <matplotlib.patches.Wedge at 0x299e7bfddf0>, <matplotlib.patches.Wedge at 0x299e7c0b700>, <matplotlib.patches.Wedge at 0x299e7c0bfd0>, <matplotlib.patches.Wedge at 0x299e7babb20>, <matplotlib.patches.Wedge at 0x299e7c261c0>, <matplotlib.patches.Wedge at 0x299e7c26a90>, <matplotlib.patches.Wedge at 0x299e7c333a0>, <matplotlib.patches.Wedge at 0x299e7c33c70>, <matplotlib.patches.Wedge at 0x299e7c42580>, <matplotlib.patches.Wedge at 0x299e7c42e50>, <matplotlib.patches.Wedge at 0x299e7c4f760>, <matplotlib.patches.Wedge at 0x299e7c4ffd0>, <matplotlib.patches.Wedge at 0x299e7c5f940>, <matplotlib.patches.Wedge at 0x299e7c6b250>, <matplotlib.patches.Wedge at 0x299e7c6bb20>, <matplotlib.patches.Wedge at 0x299e7c7a430>, <matplotlib.patches.Wedge at 0x299e7c7ad00>], [Text(-0.29527442541208304, 1.1631049022756135, '10'), Text(-0.8042995064304412, 0.8905629140918392, '12'), Text(-1.117519694455796, 0.4372067388586598, '15'), Text(-1.1962474089414488, -0.09482687699629441, '9'), Text(-1.0346807349555098, -0.6078122873979485, '13'), Text(-0.6765174749457389, -0.9911226493694117, '11'), Text(-0.22911864764834314, -1.1779238707572721, '8'), Text(0.21579305801794885, -1.1804377815502443, '14'), Text(0.5960811310112543, -1.0414832141001333, '23'), Text(0.8814171410848108, -0.8143118710923223, '16'), Text(1.0734838968530314, -0.53631364256117, '22'), Text(1.1752595138647277, -0.2424150883720822, '17'), Text(1.198774231627004, 0.05422491666278812, '20'), Text(1.1524280413670533, 0.3345289366719976, '19'), Text(1.048152691677676, 0.5842738526828348, '7'), Text(1.113203572017339, 1.0053744612072844, '0'), Text(0.9898866305901223, 1.3820725229085973, '18'), Text(0.7910635360127247, 1.7274890685590591, '6'), Text(0.5854253795461883, 2.0167491477581443, '21'), Text(0.4136030765530567, 2.2625058000071174, '5'), Text(0.25382726964780034, 2.487080963133919, '1'), Text(0.15247798501397625, 2.695691092110904, '4'), Text(0.0982969744197516, 2.8983336082687106, '3'), Text(0.03503116312343548, 3.0998020610371593, '2')], [Text(-0.1722434148237151, 0.6784778596607745, '7.9%'), Text(-0.469174712084424, 0.5194950332202395, '7.6%'), Text(-0.6518864884325476, 0.2550372643342182, '7.2%'), Text(-0.6978109885491784, -0.0553156782478384, '7.2%'), Text(-0.6035637620573806, -0.3545571676488032, '7.2%'), Text(-0.39463519371834765, -0.5781548787988234, '6.8%'), Text(-0.1336525444615335, -0.687122257941742, '6.1%'), Text(0.12587928384380348, -0.6885887059043092, '5.8%'), Text(0.3477139930898983, -0.6075318748917443, '5.0%'), Text(0.5141599989661396, -0.4750152581371879, '4.7%'), Text(0.6261989398309349, -0.3128496248273491, '4.3%'), Text(0.6855680497544243, -0.14140880155038127, '4.0%'), Text(0.6992849684490856, 0.0316312013866264, '4.0%'), Text(0.6722496907974477, 0.19514187972533195, '3.6%'), Text(0.6114224034786442, 0.340826414064987, '3.6%'), Text(0.7421357146782259, 0.6702496408048563, '3.6%'), Text(0.6987435039459686, 0.9755806044060685, '3.2%'), Text(0.582888921272534, 1.2728866820961486, '2.9%'), Text(0.4460383844161434, 1.5365707792443004, '1.8%'), Text(0.3236893642589139, 1.7706567130490485, '1.4%'), Text(0.20306181571824028, 1.9896647705071353, '1.1%'), Text(0.12424132112249917, 2.196489038016292, '0.4%'), Text(0.0813492202094496, 2.3986209171878983, '0.4%'), Text(0.029380975522881374, 2.599833986676327, '0.4%')])
En la region metropolitana el horario inicial con una mayor cantidad de disponibilidad es a las 10 AM.
Por lo tanto de la muestra podemos observar que a las 09 AM y 12 PM serian los horarios de mayor disponibilidad en la region.
Entre las 08 AM y 15 PM es el horario inicial con mayor frecuencia de disponibilidad en esta region.
Entre las 00 AM y 06 AM es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
groupingpersantiago = dfa[dfa['Region']== 13]['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 278 |
groupingpersantiago = dfa[dfa['Region']== 13]['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 51 |
| 23 | 28 |
| 22 | 20 |
| 12 | 17 |
| 15 | 17 |
| 18 | 17 |
| 20 | 16 |
| 16 | 14 |
| 21 | 13 |
| 17 | 13 |
| 19 | 11 |
| 11 | 11 |
| 10 | 11 |
| 9 | 11 |
| 14 | 8 |
| 13 | 6 |
| 8 | 4 |
| 7 | 4 |
| 1 | 4 |
| 5 | 1 |
| 3 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6, 0.8, 1, 1.2, 1.4)
grafico = dfa[dfa['Region']== 13]['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e7cc2d90>, <matplotlib.patches.Wedge at 0x299e7cce700>, <matplotlib.patches.Wedge at 0x299e7ccefd0>, <matplotlib.patches.Wedge at 0x299e7cdd8e0>, <matplotlib.patches.Wedge at 0x299e7ceb1f0>, <matplotlib.patches.Wedge at 0x299e7cebac0>, <matplotlib.patches.Wedge at 0x299e7cf9400>, <matplotlib.patches.Wedge at 0x299e7cf9cd0>, <matplotlib.patches.Wedge at 0x299e7d085e0>, <matplotlib.patches.Wedge at 0x299e7d08eb0>, <matplotlib.patches.Wedge at 0x299e7ca49a0>, <matplotlib.patches.Wedge at 0x299e7d240a0>, <matplotlib.patches.Wedge at 0x299e7d24970>, <matplotlib.patches.Wedge at 0x299e7d31280>, <matplotlib.patches.Wedge at 0x299e7d31b50>, <matplotlib.patches.Wedge at 0x299e7d3e460>, <matplotlib.patches.Wedge at 0x299e7d3ed30>, <matplotlib.patches.Wedge at 0x299e7d4b640>, <matplotlib.patches.Wedge at 0x299e7d4bf10>, <matplotlib.patches.Wedge at 0x299e7d5a820>, <matplotlib.patches.Wedge at 0x299e7d69130>], [Text(-0.6539458810416368, 1.0061584292091768, '0'), Text(-1.1937988480452586, 0.12183722914533837, '23'), Text(-1.085330126291409, -0.5119165136663147, '22'), Text(-0.7839678701729479, -0.9085121785295407, '12'), Text(-0.38626239318979794, -1.1361343950463298, '15'), Text(0.06776805906579839, -1.1980849261093536, '18'), Text(0.49961913283643544, -1.0910457011985193, '20'), Text(0.8340234754590078, -0.8627889906479325, '16'), Text(1.0546883494637074, -0.5723918985323961, '21'), Text(1.1752594968423207, -0.2424151708988846, '17'), Text(1.1972426162358123, 0.08130263137701896, '19'), Text(1.140426806994012, 0.37339884559200565, '11'), Text(1.0134840669329546, 0.6425340816431753, '10'), Text(0.8242203373858967, 0.8721587214718883, '9'), Text(0.619465805685281, 1.0277461338223004, '14'), Text(0.5622591391602135, 1.3906346250654107, '13'), Text(0.4554364542454269, 1.637857636104052, '8'), Text(0.3416722488978435, 1.869026504449065, '7'), Text(0.189593131517724, 2.0914240231194876, '1'), Text(0.07795984086907554, 2.2986783731552505, '5'), Text(0.028251124512916375, 2.4998403696963845, '3')], [Text(-0.38146843060762137, 0.5869257503720197, '18.3%'), Text(-0.6963826613597341, 0.07107171700144738, '10.1%'), Text(-0.6331092403366553, -0.2986179663053502, '7.2%'), Text(-0.4573145909342196, -0.5299654374755653, '6.1%'), Text(-0.22531972936071543, -0.6627450637770258, '6.1%'), Text(0.03953136778838239, -0.6988828735637894, '6.1%'), Text(0.2914444941545873, -0.6364433256991362, '5.8%'), Text(0.48651369401775446, -0.5032935778779606, '5.0%'), Text(0.6152348705204959, -0.33389527414389775, '4.7%'), Text(0.685568039824687, -0.14140884969101597, '4.7%'), Text(0.6983915261375572, 0.04742653496992772, '4.0%'), Text(0.665248970746507, 0.2178159932620033, '4.0%'), Text(0.5911990390442234, 0.37481154762518554, '4.0%'), Text(0.4807951968084397, 0.5087592541919348, '4.0%'), Text(0.3613550533164138, 0.5995185780630086, '2.9%'), Text(0.374839426106809, 0.927089750043607, '2.2%'), Text(0.3214845559379484, 1.1561348019558013, '1.4%'), Text(0.2517584991878846, 1.3771774243308899, '1.4%'), Text(0.1444519097277897, 1.5934659223767524, '1.4%'), Text(0.06101204937579825, 1.7989656833388916, '0.4%'), Text(0.022600899610333097, 1.9998722957571076, '0.4%')])
groupingperloslagos = dfa[dfa['Region']== 10]['contador'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 45 |
groupingperloslagos = dfa[dfa['Region']== 10]['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'hora_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 6 |
| 11 | 4 |
| 18 | 4 |
| 17 | 4 |
| 10 | 4 |
| 16 | 3 |
| 14 | 3 |
| 5 | 2 |
| 8 | 2 |
| 9 | 2 |
| 12 | 2 |
| 21 | 2 |
| 13 | 2 |
| 19 | 1 |
| 6 | 1 |
| 20 | 1 |
| 4 | 1 |
| 23 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6, 0.8)
grafico = dfa[dfa['Region']== 10]['hora_desde'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e7e488b0>, <matplotlib.patches.Wedge at 0x299e7e57220>, <matplotlib.patches.Wedge at 0x299e7e57a00>, <matplotlib.patches.Wedge at 0x299e7e65250>, <matplotlib.patches.Wedge at 0x299e7e65a60>, <matplotlib.patches.Wedge at 0x299e7e742b0>, <matplotlib.patches.Wedge at 0x299e7e74ac0>, <matplotlib.patches.Wedge at 0x299e7e83310>, <matplotlib.patches.Wedge at 0x299e7e83b20>, <matplotlib.patches.Wedge at 0x299e7e92370>, <matplotlib.patches.Wedge at 0x299e7e278e0>, <matplotlib.patches.Wedge at 0x299e7ea23a0>, <matplotlib.patches.Wedge at 0x299e7ea2bb0>, <matplotlib.patches.Wedge at 0x299e7eb1400>, <matplotlib.patches.Wedge at 0x299e7eb1c10>, <matplotlib.patches.Wedge at 0x299e7ebf460>, <matplotlib.patches.Wedge at 0x299e7ebfc70>, <matplotlib.patches.Wedge at 0x299e7ecf4c0>], [Text(-0.4880839956400038, 1.0962545385083198, '0'), Text(-1.078552882100313, 0.5260453217291345, '11'), Text(-1.1934262664168636, -0.12543423227454908, '18'), Text(-0.945612847069959, -0.7387938436778196, '17'), Text(-0.41042406934703285, -1.127631182302362, '10'), Text(0.16700785033579646, -1.1883216643342898, '16'), Text(0.6359032499424957, -1.0176576323659012, '14'), Text(0.9456130113507554, -0.7387936334079743, '5'), Text(1.1126206936390517, -0.4495277433998435, '8'), Text(1.193426294308835, -0.125433966900047, '9'), Text(1.181769269201622, 0.2083780083662003, '12'), Text(1.0785527651269822, 0.5260455615599667, '21'), Text(0.8917736471077282, 0.8029568869647867, '13'), Text(0.7053421243699795, 0.9708205228512863, '19'), Text(0.5633656770787913, 1.059537216849675, '6'), Text(0.5130299464650656, 1.4095390289133722, '20'), Text(0.3534495519876527, 1.662850989776212, '4'), Text(0.13253692622073132, 1.895371721638782, '23')], [Text(-0.28471566412333554, 0.639481814129853, '13.3%'), Text(-0.6291558478918491, 0.3068597710086618, '8.9%'), Text(-0.6961653220765036, -0.07316996882682028, '8.9%'), Text(-0.5516074941241427, -0.4309630754787281, '8.9%'), Text(-0.23941404045243583, -0.6577848563430443, '8.9%'), Text(0.09742124602921459, -0.6931876375283356, '6.7%'), Text(0.3709435624664558, -0.593633618880109, '6.7%'), Text(0.5516075899546072, -0.43096295282131836, '4.4%'), Text(0.6490287379561135, -0.26222451698324206, '4.4%'), Text(0.6961653383468204, -0.0731698140250274, '4.4%'), Text(0.6893654070342795, 0.12155383821361683, '4.4%'), Text(0.6291557796574063, 0.3068599109099806, '4.4%'), Text(0.5202012941461748, 0.46839151739612556, '4.4%'), Text(0.4114495725491546, 0.5663119716632503, '2.2%'), Text(0.3286299782959615, 0.6180633764956438, '2.2%'), Text(0.34201996431004367, 0.9396926859422481, '2.2%'), Text(0.24949380140304894, 1.1737771692537966, '2.2%'), Text(0.09765878774159151, 1.396589689628576, '2.2%')])
groupingperloslagos = dfa[dfa['Region']== 10]['contador'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 45 |
groupingperloslagos = dfa[dfa['Region']== 10]['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperloslagos)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 6 |
| 17 | 6 |
| 19 | 5 |
| 18 | 4 |
| 14 | 4 |
| 16 | 3 |
| 11 | 3 |
| 20 | 2 |
| 21 | 2 |
| 13 | 2 |
| 23 | 2 |
| 22 | 1 |
| 10 | 1 |
| 9 | 1 |
| 8 | 1 |
| 6 | 1 |
| 4 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6)
grafico = dfa[dfa['Region']== 10]['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e7d8cb80>, <matplotlib.patches.Wedge at 0x299e7d816a0>, <matplotlib.patches.Wedge at 0x299e7d814f0>, <matplotlib.patches.Wedge at 0x299e7cab9a0>, <matplotlib.patches.Wedge at 0x299e7da6d30>, <matplotlib.patches.Wedge at 0x299e7da60a0>, <matplotlib.patches.Wedge at 0x299e6499250>, <matplotlib.patches.Wedge at 0x299e5bc5820>, <matplotlib.patches.Wedge at 0x299e67148b0>, <matplotlib.patches.Wedge at 0x299e6422940>, <matplotlib.patches.Wedge at 0x299e7c33e50>, <matplotlib.patches.Wedge at 0x299e620cfd0>, <matplotlib.patches.Wedge at 0x299e5b96940>, <matplotlib.patches.Wedge at 0x299e63cfd30>, <matplotlib.patches.Wedge at 0x299e63694c0>, <matplotlib.patches.Wedge at 0x299e622e760>, <matplotlib.patches.Wedge at 0x299e6737460>], [Text(-0.4880839956400038, 1.0962545385083198, '0'), Text(-1.1412678438572794, 0.37082031845269275, '17'), Text(-1.078552808222426, -0.5260454732012421, '19'), Text(-0.5633657700797582, -1.0595371674002008, '18'), Text(0.08370790360971714, -1.1970768508634968, '14'), Text(0.6359032499424957, -1.0176576323659012, '16'), Text(0.9948451893336216, -0.6710313325469615, '11'), Text(1.1643549199274543, -0.29030608061274193, '20'), Text(1.199268985158096, 0.04187960407968291, '21'), Text(1.1412677527206476, 0.37082059894234964, '13'), Text(0.9948449615875475, 0.671031670194389, '23'), Text(0.8335898787588788, 0.8632079205097448, '22'), Text(0.7053421130081328, 0.9708205311061477, '10'), Text(0.5633656646786616, 1.0595372234429379, '9'), Text(0.41042394397499515, 1.127631227934031, '8'), Text(0.31186723458241355, 1.4672214652171358, '6'), Text(0.11858565098185359, 1.6958589102225488, '4')], [Text(-0.28471566412333554, 0.639481814129853, '13.3%'), Text(-0.665739575583413, 0.21631185243073744, '13.3%'), Text(-0.6291558047964152, -0.3068598593673912, '11.1%'), Text(-0.32863003254652556, -0.6180633476501172, '8.9%'), Text(0.048829610439001664, -0.6982948296703732, '8.9%'), Text(0.3709435624664558, -0.593633618880109, '6.7%'), Text(0.5803263604446126, -0.3914349439857275, '6.7%'), Text(0.6792070366243482, -0.1693452136907661, '4.4%'), Text(0.6995735746755558, 0.02442976904648169, '4.4%'), Text(0.6657395224203777, 0.21631201604970396, '4.4%'), Text(0.580326227592736, 0.39143514094672693, '4.4%'), Text(0.486260762609346, 0.5035379536306844, '2.2%'), Text(0.41144956592141074, 0.5663119764785861, '2.2%'), Text(0.3286299710625526, 0.6180633803417137, '2.2%'), Text(0.23941396731874717, 0.6577848829615179, '2.2%'), Text(0.20791148972160903, 0.9781476434780905, '2.2%'), Text(0.08370751834013193, 1.1970768778041518, '2.2%')])
groupingperbiobio = dfa[dfa['Region']== 8]['contador'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 42 |
groupingperbiobio = dfa[dfa['Region']== 8]['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'hora_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 14 | 5 |
| 17 | 4 |
| 10 | 4 |
| 16 | 3 |
| 15 | 3 |
| 12 | 3 |
| 9 | 3 |
| 7 | 2 |
| 21 | 2 |
| 18 | 2 |
| 22 | 2 |
| 8 | 2 |
| 23 | 1 |
| 1 | 1 |
| 5 | 1 |
| 13 | 1 |
| 11 | 1 |
| 20 | 1 |
| 0 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6, 0.8, 1)
grafico = dfa[dfa['Region']== 8]['hora_desde'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e629b6a0>, <matplotlib.patches.Wedge at 0x299e5f4be50>, <matplotlib.patches.Wedge at 0x299e5fedfd0>, <matplotlib.patches.Wedge at 0x299e6115340>, <matplotlib.patches.Wedge at 0x299e6ae09d0>, <matplotlib.patches.Wedge at 0x299e65ede80>, <matplotlib.patches.Wedge at 0x299e65bce20>, <matplotlib.patches.Wedge at 0x299e64358b0>, <matplotlib.patches.Wedge at 0x299e6974400>, <matplotlib.patches.Wedge at 0x299e69748b0>, <matplotlib.patches.Wedge at 0x299e66fb5e0>, <matplotlib.patches.Wedge at 0x299e5bc2220>, <matplotlib.patches.Wedge at 0x299e7ef8550>, <matplotlib.patches.Wedge at 0x299e7ef8e50>, <matplotlib.patches.Wedge at 0x299e7fc2760>, <matplotlib.patches.Wedge at 0x299e7fc2fd0>, <matplotlib.patches.Wedge at 0x299e7fd1940>, <matplotlib.patches.Wedge at 0x299e7fdf250>, <matplotlib.patches.Wedge at 0x299e7fdfb20>], [Text(-0.43840923048474106, 1.1170484978843922, '14'), Text(-1.039230489222664, 0.5999999918916852, '17'), Text(-1.1966445549182085, -0.08967613497805565, '10'), Text(-0.991486505822097, -0.6759841039349143, '16'), Text(-0.599999943241794, -1.03923051731069, '15'), Text(-0.08967602294010718, -1.196644563314289, '12'), Text(0.438409335070367, -1.1170484568375534, '9'), Text(0.8162073799409628, -0.8796621584050942, '7'), Text(1.0392305524207186, -0.5999998824294286, '21'), Text(1.1699135263154914, -0.2670249818725812, '18'), Text(1.1966445454726058, 0.08967626102074748, '22'), Text(1.117048441444986, 0.438409374289976, '8'), Text(0.9914864385762555, 0.6759842025664308, '23'), Text(0.8796621345242028, 0.8162074056784363, '1'), Text(0.7481876312541393, 0.9381978834117672, '5'), Text(0.7499998150290571, 1.2990382124696642, '13'), Text(0.6210795116820639, 1.5824854628617508, '11'), Text(0.42278950043447894, 1.85236309570299, '20'), Text(0.1569328808412258, 2.0941279977381693, '0')], [Text(-0.2557387177827656, 0.6516116237658954, '11.9%'), Text(-0.6062177853798874, 0.3499999952701497, '9.5%'), Text(-0.6980426570356216, -0.05231107873719913, '9.5%'), Text(-0.5783671283962233, -0.39432406062869996, '7.1%'), Text(-0.3499999668910464, -0.6062178017645692, '7.1%'), Text(-0.05231101338172918, -0.6980426619333352, '7.1%'), Text(0.2557387787910474, -0.651611599821906, '7.1%'), Text(0.4761209716322283, -0.5131362590696382, '4.8%'), Text(0.6062178222454192, -0.3499999314171666, '4.8%'), Text(0.6824495570173699, -0.15576457275900568, '4.8%'), Text(0.6980426515256866, 0.052311152262102686, '4.8%'), Text(0.6516115908429083, 0.25573880166915264, '4.8%'), Text(0.5783670891694823, 0.3943241181637513, '2.4%'), Text(0.5131362451391184, 0.4761209866457545, '2.4%'), Text(0.43644278489824795, 0.5472820986568643, '2.4%'), Text(0.499999876686038, 0.8660254749797762, '2.4%'), Text(0.4384090670696921, 1.1170485620200592, '2.4%'), Text(0.31152910558330027, 1.3648991231495715, '2.4%'), Text(0.11956790921236252, 1.5955260935147955, '2.4%')])
En la region metropolitana el horario inicial con una mayor cantidad de disponibilidad es a las 14 PM.
Por lo tanto de la muestra podemos observar que a las 14 AM y 17 PM serian los horarios de mayor disponibilidad en la region.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la region del bio bio.
el analisis porcentual nos muestra que un 2,4 % es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
groupingperbiobio = dfa[dfa['Region']== 8 ]['contador'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 42 |
groupingperbiobio = dfa[dfa['Region']== 8]['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperbiobio)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 7 |
| 15 | 6 |
| 23 | 5 |
| 18 | 3 |
| 17 | 3 |
| 14 | 3 |
| 12 | 3 |
| 22 | 2 |
| 21 | 2 |
| 20 | 2 |
| 19 | 1 |
| 11 | 1 |
| 10 | 1 |
| 9 | 1 |
| 8 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.2, 0.4)
grafico = dfa[dfa['Region']== 8]['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9154940>, <matplotlib.patches.Wedge at 0x299e91612b0>, <matplotlib.patches.Wedge at 0x299e9161bb0>, <matplotlib.patches.Wedge at 0x299e91704c0>, <matplotlib.patches.Wedge at 0x299e9170d90>, <matplotlib.patches.Wedge at 0x299e917e6a0>, <matplotlib.patches.Wedge at 0x299e917ef70>, <matplotlib.patches.Wedge at 0x299e918c880>, <matplotlib.patches.Wedge at 0x299e919a190>, <matplotlib.patches.Wedge at 0x299e919aa60>, <matplotlib.patches.Wedge at 0x299e91385b0>, <matplotlib.patches.Wedge at 0x299e91a8c10>, <matplotlib.patches.Wedge at 0x299e91b6520>, <matplotlib.patches.Wedge at 0x299e91b6df0>, <matplotlib.patches.Wedge at 0x299e91c2700>, <matplotlib.patches.Wedge at 0x299e91c2fd0>], [Text(-0.6000000162166297, 1.0392304751786507, '0'), Text(-1.1966445612152699, 0.08967605094959426, '15'), Text(-0.8796621870621624, -0.8162073490559941, '23'), Text(-0.2670250229482847, -1.1699135169402346, '18'), Text(0.2670252420186967, -1.16991346693884, '17'), Text(0.7481878783053089, -0.9381976863950372, '14'), Text(1.0811627163455122, -0.5206603314872313, '12'), Text(1.1966445706608508, -0.08967592490690025, '22'), Text(1.1699134513133957, 0.2670253104781995, '21'), Text(1.0392303838925483, 0.6000001743287636, '20'), Text(0.8796621058671332, 0.8162074365634023, '19'), Text(0.7481875983139793, 0.93819790968066, '11'), Text(0.5999998155358246, 1.0392305910417459, '10'), Text(0.43840902785007885, 1.117048577412616, '9'), Text(0.2892769821143851, 1.2674063387954133, '8'), Text(0.1120948623688017, 1.495805716605776, '1')], [Text(-0.3500000094597006, 0.6062177771875461, '16.7%'), Text(-0.6980426607089074, 0.05231102972059665, '14.3%'), Text(-0.5131362757862613, -0.4761209536159965, '11.9%'), Text(-0.1557645967198327, -0.6824495515484701, '7.1%'), Text(0.1557647245109064, -0.68244952238099, '7.1%'), Text(0.43644292901143017, -0.5472819837304383, '7.1%'), Text(0.6306782512015487, -0.3037185267008849, '7.1%'), Text(0.6980426662188297, -0.052310956195691816, '4.8%'), Text(0.6824495132661476, 0.15576476444561638, '4.8%'), Text(0.6062177239373199, 0.35000010169177875, '4.8%'), Text(0.5131362284224943, 0.4761210046619847, '2.4%'), Text(0.4364427656831546, 0.547282113980385, '2.4%'), Text(0.3499998923958977, 0.6062178447743518, '2.4%'), Text(0.25573859957921263, 0.6516116701573592, '2.4%'), Text(0.1780166043780831, 0.7799423623356389, '2.4%'), Text(0.0747299082458678, 0.9972038110705173, '2.4%')])
groupingpervalparaiso = dfa[dfa['Region']== 5]['contador'].value_counts()
grouping = pd.DataFrame(groupingpervalparaiso)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 41 |
groupingpervalparaiso = dfa[dfa['Region']== 5]['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingpervalparaiso)
grouping = grouping.rename(columns={'hora_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 8 | 7 |
| 9 | 6 |
| 14 | 5 |
| 10 | 3 |
| 21 | 3 |
| 15 | 3 |
| 22 | 3 |
| 12 | 2 |
| 3 | 1 |
| 7 | 1 |
| 23 | 1 |
| 11 | 1 |
| 16 | 1 |
| 18 | 1 |
| 19 | 1 |
| 20 | 1 |
| 2 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6)
grafico = dfa[dfa['Region']== 5]['hora_desde'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9212670>, <matplotlib.patches.Wedge at 0x299e9212e80>, <matplotlib.patches.Wedge at 0x299e9220790>, <matplotlib.patches.Wedge at 0x299e922e0a0>, <matplotlib.patches.Wedge at 0x299e922e970>, <matplotlib.patches.Wedge at 0x299e923c280>, <matplotlib.patches.Wedge at 0x299e923cb50>, <matplotlib.patches.Wedge at 0x299e924a460>, <matplotlib.patches.Wedge at 0x299e924ad30>, <matplotlib.patches.Wedge at 0x299e9259640>, <matplotlib.patches.Wedge at 0x299e91f4130>, <matplotlib.patches.Wedge at 0x299e92657f0>, <matplotlib.patches.Wedge at 0x299e9274100>, <matplotlib.patches.Wedge at 0x299e92749d0>, <matplotlib.patches.Wedge at 0x299e92832e0>, <matplotlib.patches.Wedge at 0x299e9283bb0>, <matplotlib.patches.Wedge at 0x299e92904c0>], [Text(-0.6132224188697443, 1.0314835262841282, '8'), Text(-1.1991194167886485, 0.04596329275032273, '9'), Text(-0.8321190167462257, -0.8646258971192655, '14'), Text(-0.1831791620510462, -1.1859365052945612, '10'), Text(0.3620646784722687, -1.1440756830746701, '21'), Text(0.832118956032134, -0.8646259555507176, '15'), Text(1.1293680295559225, -0.4056203321050034, '22'), Text(1.1991194210920373, 0.04596318048065929, '12'), Text(1.1571042237703992, 0.3179776962818339, '3'), Text(1.0950043876932742, 0.4908822577079739, '7'), Text(1.007238578759822, 0.6522809559215219, '23'), Text(0.8958639529916208, 0.7983907425128545, '11'), Text(0.7634910370258041, 0.9257869281758424, '16'), Text(0.6132225395878125, 1.031483454516588, '18'), Text(0.448580626634012, 1.1130028847261075, '19'), Text(0.34178045596633144, 1.4605430907437982, '20'), Text(0.13013396303136976, 1.6950118441078077, '2')], [Text(-0.3577130776740175, 0.6016987236657414, '17.1%'), Text(-0.6994863264600448, 0.026811920771021593, '14.6%'), Text(-0.48540275976863156, -0.5043651066529048, '12.2%'), Text(-0.1068545111964436, -0.6917962947551606, '7.3%'), Text(0.21120439577549008, -0.6673774817935575, '7.3%'), Text(0.48540272435207815, -0.5043651407379186, '7.3%'), Text(0.6587980172409547, -0.23661186039458532, '7.3%'), Text(0.699486328970355, 0.026811855280384586, '4.9%'), Text(0.6749774638660662, 0.18548698949773645, '2.4%'), Text(0.6387525594877432, 0.28634798366298475, '2.4%'), Text(0.587555837609896, 0.38049722428755445, '2.4%'), Text(0.5225873059117787, 0.46572793313249844, '2.4%'), Text(0.4453697715983857, 0.5400423747692413, '2.4%'), Text(0.3577131480928906, 0.6016986818013429, '2.4%'), Text(0.26167203220317364, 0.649251682756896, '2.4%'), Text(0.2278536373108876, 0.9736953938291988, '2.4%'), Text(0.09185926802214336, 1.1964789487819818, '2.4%')])
En la region de valparaiso el horario inicial con una mayor cantidad de disponibilidad es a las 08 AM.
Por lo tanto de la muestra podemos observar que entre las 08 AM y 09 AM serian los horarios de mayor disponibilidad en la region.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la region de valparaiso.
De la muestra seleccionada a las 02 AM y 20 PM es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
el analisis porcentual nos muestra que un 2,4 % es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
groupingpervalparaiso = dfa[dfa['Region']== 5]['contador'].value_counts()
grouping = pd.DataFrame(groupingpervalparaiso)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 41 |
groupingpervalparaiso = dfa[dfa['Region']== 5]['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingpervalparaiso)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 8 |
| 14 | 5 |
| 23 | 4 |
| 19 | 4 |
| 21 | 3 |
| 20 | 3 |
| 12 | 3 |
| 22 | 2 |
| 9 | 2 |
| 18 | 1 |
| 17 | 1 |
| 15 | 1 |
| 11 | 1 |
| 10 | 1 |
| 8 | 1 |
| 2 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.2, 0.4)
grafico = dfa[dfa['Region']== 5]['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e93e5130>, <matplotlib.patches.Wedge at 0x299e93e5760>, <matplotlib.patches.Wedge at 0x299e93e5f70>, <matplotlib.patches.Wedge at 0x299e93f57c0>, <matplotlib.patches.Wedge at 0x299e93f5fd0>, <matplotlib.patches.Wedge at 0x299e9404820>, <matplotlib.patches.Wedge at 0x299e9414070>, <matplotlib.patches.Wedge at 0x299e9414880>, <matplotlib.patches.Wedge at 0x299e94220d0>, <matplotlib.patches.Wedge at 0x299e94228e0>, <matplotlib.patches.Wedge at 0x299e93bfdf0>, <matplotlib.patches.Wedge at 0x299e9433910>, <matplotlib.patches.Wedge at 0x299e9441160>, <matplotlib.patches.Wedge at 0x299e9441970>, <matplotlib.patches.Wedge at 0x299e94501c0>, <matplotlib.patches.Wedge at 0x299e94509d0>], [Text(-0.6903823698486643, 0.9815152486854914, '0'), Text(-1.1991194189403442, -0.045963236615491246, '14'), Text(-0.8958638969285662, -0.7983908054204805, '23'), Text(-0.2734242827255162, -1.1684344917949132, '19'), Text(0.36206462491421976, -1.1440757000241397, '21'), Text(0.8321189155560714, -0.864625994505016, '20'), Text(1.1293680105674628, -0.4056203849745365, '12'), Text(1.1991194232437279, 0.04596312434582843, '22'), Text(1.129368115003959, 0.4056200941920954, '9'), Text(1.0072386092952956, 0.6522809087692808, '18'), Text(0.8958639903669875, 0.7983907005744358, '17'), Text(0.7634910803650169, 0.9257868924342468, '15'), Text(0.6132225878750368, 1.0314834258095682, '11'), Text(0.4485806787374363, 1.113002863726532, '10'), Text(0.2962097877607153, 1.2658039981113791, '8'), Text(0.11482415504170712, 1.4955986806021724, '2')], [Text(-0.4027230490783875, 0.5725505617332034, '19.5%'), Text(-0.6994863277152007, -0.026811888025703227, '12.2%'), Text(-0.5225872732083303, -0.46572796982861353, '9.8%'), Text(-0.1594974982565511, -0.681586786880366, '9.8%'), Text(0.21120436453329486, -0.6673774916807482, '7.3%'), Text(0.48540270074104164, -0.5043651634612593, '7.3%'), Text(0.6587980061643534, -0.23661189123514625, '7.3%'), Text(0.6994863302255078, 0.026811822535066584, '4.9%'), Text(0.6587980670856427, 0.23661172161205563, '4.9%'), Text(0.5875558554222557, 0.3804971967820804, '2.4%'), Text(0.522587327714076, 0.46572790866842084, '2.4%'), Text(0.4453697968795931, 0.5400423539199772, '2.4%'), Text(0.35771317626043814, 0.6016986650555813, '2.4%'), Text(0.26167206259683784, 0.6492516705071436, '2.4%'), Text(0.18228294631428632, 0.7789563065300794, '2.4%'), Text(0.07654943669447141, 0.9970657870681148, '2.4%')])
De la muestra seleccionada, a las 02 AM y 08 AM es el rango de horario final con menor frecuencia de disponibilidad en esta region.
el analisis porcentual nos muestra que un 2,4 % es el rango de horario final con menor frecuencia de disponibilidad en la region de valparaiso.
groupingperantofagasta = dfa[dfa['Region']== 2]['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 39 |
groupingperantofagasta = dfa[dfa['Region']== 2]['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'hora_desde':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 10 | 4 |
| 8 | 4 |
| 22 | 3 |
| 21 | 3 |
| 17 | 3 |
| 14 | 3 |
| 12 | 3 |
| 11 | 3 |
| 9 | 3 |
| 20 | 2 |
| 15 | 2 |
| 13 | 2 |
| 19 | 1 |
| 16 | 1 |
| 5 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.2, 0.4)
grafico = dfa[dfa['Region']== 2]['hora_desde'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e949a3d0>, <matplotlib.patches.Wedge at 0x299e949ad00>, <matplotlib.patches.Wedge at 0x299e94a9520>, <matplotlib.patches.Wedge at 0x299e94a9d30>, <matplotlib.patches.Wedge at 0x299e94b9580>, <matplotlib.patches.Wedge at 0x299e94b9d90>, <matplotlib.patches.Wedge at 0x299e94c75e0>, <matplotlib.patches.Wedge at 0x299e94c7df0>, <matplotlib.patches.Wedge at 0x299e94d7640>, <matplotlib.patches.Wedge at 0x299e94d7e50>, <matplotlib.patches.Wedge at 0x299e94724c0>, <matplotlib.patches.Wedge at 0x299e94e6e80>, <matplotlib.patches.Wedge at 0x299e94f46d0>, <matplotlib.patches.Wedge at 0x299e94f4ee0>, <matplotlib.patches.Wedge at 0x299e9503730>, <matplotlib.patches.Wedge at 0x299e9503f40>], [Text(-0.3800015973437572, 1.138243728740112, '10'), Text(-0.9875806476639818, 0.6816776836303139, '8'), Text(-1.1990267990528731, 0.048319097187563456, '22'), Text(-1.0841404989939356, -0.5144311211825937, '21'), Text(-0.7208906577819498, -0.9593313606479816, '17'), Text(-0.1924934424823586, -1.1844603305308672, '14'), Text(0.3800017039138244, -1.1382436931617896, '12'), Text(0.8654430331010652, -0.8312691239645731, '11'), Text(1.1526217786410025, -0.33386080243486543, '9'), Text(1.191250627952743, 0.14464418896794873, '20'), Text(1.0841404448088476, 0.5144312353752195, '15'), Text(0.8654428093425667, 0.8312693569218379, '13'), Text(0.6413588326320071, 1.0142282030218392, '19'), Text(0.4703597567467585, 1.1039754069874612, '16'), Text(0.31111016073951087, 1.2622244126480189, '5'), Text(0.12069960967214854, 1.4951359818508116, '1')], [Text(-0.22166759845052503, 0.6639755084317318, '10.3%'), Text(-0.5760887111373226, 0.39764531545101645, '10.3%'), Text(-0.6994322994475093, 0.028186140026078683, '7.7%'), Text(-0.6324152910797958, -0.30008482068984627, '7.7%'), Text(-0.42051955037280403, -0.5596099603779893, '7.7%'), Text(-0.1122878414480425, -0.6909351928096724, '7.7%'), Text(0.22166766061639753, -0.6639754876777106, '7.7%'), Text(0.5048417693089546, -0.48490698897933426, '7.7%'), Text(0.6723627042072513, -0.1947521347536715, '7.7%'), Text(0.6948961996391, 0.08437577689797007, '5.1%'), Text(0.6324152594718276, 0.3000848873022114, '5.1%'), Text(0.5048416387831639, 0.48490712487107207, '5.1%'), Text(0.37412598570200406, 0.5916331184294062, '2.6%'), Text(0.2743765247689424, 0.6439856540760189, '2.6%'), Text(0.1914524066089297, 0.776753484706473, '2.6%'), Text(0.08046640644809902, 0.9967573212338745, '2.6%')])
En la region de antofagasta el horario inicial con una mayor cantidad de disponibilidad es a las 10 AM.
Por lo tanto de la muestra podemos observar que a las 08 AM y 10 AM serian los horarios de mayor disponibilidad en la region.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la region de antofagasta.
De la muestra seleccionada, a las 01 AM y 05 AM es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
El analisis porcentual nos muestra que un 2,6 % es el rango de horario inicial con menor frecuencia de disponibilidad en esta region.
groupingperantofagasta = dfa[dfa['Region']== 2]['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 39 |
groupingperantofagasta = dfa[dfa['Region']== 2]['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 7 |
| 22 | 5 |
| 21 | 4 |
| 15 | 4 |
| 20 | 3 |
| 17 | 3 |
| 12 | 3 |
| 13 | 2 |
| 23 | 1 |
| 14 | 1 |
| 11 | 1 |
| 10 | 1 |
| 8 | 1 |
| 5 | 1 |
| 2 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.2, 0.4)
grafico = dfa[dfa['Region']== 2]['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e907b7f0>, <matplotlib.patches.Wedge at 0x299e9075670>, <matplotlib.patches.Wedge at 0x299e91a8760>, <matplotlib.patches.Wedge at 0x299e9132d00>, <matplotlib.patches.Wedge at 0x299e91e8760>, <matplotlib.patches.Wedge at 0x299e923cf70>, <matplotlib.patches.Wedge at 0x299e91f1340>, <matplotlib.patches.Wedge at 0x299e912feb0>, <matplotlib.patches.Wedge at 0x299e9205c10>, <matplotlib.patches.Wedge at 0x299e905e2e0>, <matplotlib.patches.Wedge at 0x299e9146760>, <matplotlib.patches.Wedge at 0x299e92d3f10>, <matplotlib.patches.Wedge at 0x299e91e30a0>, <matplotlib.patches.Wedge at 0x299e92f4730>, <matplotlib.patches.Wedge at 0x299e92e9a00>, <matplotlib.patches.Wedge at 0x299e9514d90>], [Text(-0.6413590047449992, 1.014228094184195, '0'), Text(-1.1990268001838629, 0.048319069122316025, '22'), Text(-0.9295258963458459, -0.7589345215645761, '21'), Text(-0.28717869854687733, -1.1651302052135297, '15'), Text(0.3800017039138244, -1.1382436931617896, '20'), Text(0.8654430331010652, -0.8312691239645731, '17'), Text(1.1526217786410025, -0.33386080243486543, '12'), Text(1.191250627952743, 0.14464418896794873, '13'), Text(1.1220194282053721, 0.42552603061351024, '23'), Text(1.0392303944255614, 0.6000001560850565, '14'), Text(0.9295258386123736, 0.7589345922752262, '11'), Text(0.7957470512101518, 0.8982130206640007, '10'), Text(0.6413588326320071, 1.0142282030218392, '8'), Text(0.4703597567467585, 1.1039754069874612, '5'), Text(0.31111016073951087, 1.2622244126480189, '2'), Text(0.12069960967214854, 1.4951359818508116, '1')], [Text(-0.37412608610124953, 0.5916330549407804, '17.9%'), Text(-0.6994323001072532, 0.028186123654684345, '12.8%'), Text(-0.5422234395350767, -0.44271180424600265, '10.3%'), Text(-0.1675209074856784, -0.679659286374559, '10.3%'), Text(0.22166766061639753, -0.6639754876777106, '7.7%'), Text(0.5048417693089546, -0.48490698897933426, '7.7%'), Text(0.6723627042072513, -0.1947521347536715, '7.7%'), Text(0.6948961996391, 0.08437577689797007, '5.1%'), Text(0.6545113331198003, 0.24822351785788094, '2.6%'), Text(0.6062177300815774, 0.35000009104961627, '2.6%'), Text(0.5422234058572178, 0.4427118454938819, '2.6%'), Text(0.46418577987258847, 0.5239575953873337, '2.6%'), Text(0.37412598570200406, 0.5916331184294062, '2.6%'), Text(0.2743765247689424, 0.6439856540760189, '2.6%'), Text(0.1914524066089297, 0.776753484706473, '2.6%'), Text(0.08046640644809902, 0.9967573212338745, '2.6%')])
Entre las 01 AM y 02 AM es el rango de horario final con menor frecuencia de disponibilidad en esta region.
el analisis porcentual nos muestra que un 2,6 % es el rango de horario final con menor frecuencia de disponibilidad en esta region.
groupingpersantiago = dfa[dfa['Comuna']== 'Santiago']['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 1 | 61 |
groupingpersantiago = dfa[dfa['Comuna']== 'Santiago']['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'hora_desde':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 13 | 7 |
| 15 | 6 |
| 14 | 6 |
| 10 | 5 |
| 19 | 4 |
| 17 | 4 |
| 12 | 4 |
| 11 | 4 |
| 6 | 3 |
| 8 | 3 |
| 22 | 3 |
| 9 | 2 |
| 23 | 2 |
| 16 | 2 |
| 18 | 2 |
| 7 | 1 |
| 20 | 1 |
| 5 | 1 |
| 0 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.4, 0.6, 0.8, 1)
grafico = dfa[dfa['Comuna']== 'Santiago']['hora_desde'].value_counts()
plt.figure(figsize=(7,7))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e7dbe9d0>, <matplotlib.patches.Wedge at 0x299e7dd6310>, <matplotlib.patches.Wedge at 0x299e7dd6a90>, <matplotlib.patches.Wedge at 0x299e7df6970>, <matplotlib.patches.Wedge at 0x299e7df6b80>, <matplotlib.patches.Wedge at 0x299e7ee9880>, <matplotlib.patches.Wedge at 0x299e7dd9910>, <matplotlib.patches.Wedge at 0x299e7dd9c40>, <matplotlib.patches.Wedge at 0x299e9527e80>, <matplotlib.patches.Wedge at 0x299e9585790>, <matplotlib.patches.Wedge at 0x299e7e0de20>, <matplotlib.patches.Wedge at 0x299e9594940>, <matplotlib.patches.Wedge at 0x299e95a1250>, <matplotlib.patches.Wedge at 0x299e95a1b20>, <matplotlib.patches.Wedge at 0x299e95b0430>, <matplotlib.patches.Wedge at 0x299e95b0d00>, <matplotlib.patches.Wedge at 0x299e95be610>, <matplotlib.patches.Wedge at 0x299e95beee0>, <matplotlib.patches.Wedge at 0x299e95cb7f0>], [Text(-0.42330249438000117, 1.1228601864220091, '13'), Text(-1.0287775470544445, 0.6177513728650389, '15'), Text(-1.1964210315960875, -0.09261055638832026, '14'), Text(-0.9598070900947968, -0.7202571414458581, '10'), Text(-0.5365125614671379, -1.073384493733709, '19'), Text(-0.06177454435172652, -1.1984089058706702, '17'), Text(0.4233024418151214, -1.122860206238228, '12'), Text(0.837532918448763, -0.8593826915377676, '11'), Text(1.086842671582403, -0.5086973631026849, '6'), Text(1.1900671965476481, -0.15407812207195964, '8'), Text(1.1805575579032115, 0.21513682269106196, '22'), Text(1.0868427549308366, 0.5086971850269565, '9'), Text(0.9598071575301335, 0.7202570515822291, '23'), Text(0.7921826350764495, 0.9013582377075904, '16'), Text(0.5910577981573765, 1.0443422232378399, '18'), Text(0.5291282986667692, 1.4035751649092436, '7'), Text(0.43294111163090065, 1.6439470775726939, '20'), Text(0.29239234318692875, 1.8773669640338453, '5'), Text(0.1081056735154525, 2.0972155738869027, '0')], [Text(-0.2469264550550007, 0.6550017754128387, '11.5%'), Text(-0.6001202357817592, 0.36035496750460594, '9.8%'), Text(-0.6979122684310509, -0.05402282455985349, '9.8%'), Text(-0.5598874692219649, -0.4201499991767505, '8.2%'), Text(-0.31296566085583044, -0.6261409546779969, '6.6%'), Text(-0.03603515087184046, -0.6990718617578908, '6.6%'), Text(0.24692642439215415, -0.6550017869722996, '6.6%'), Text(0.4885608690951117, -0.5013065700636977, '6.6%'), Text(0.6339915584230684, -0.2967401284765661, '4.9%'), Text(0.6942058646527947, -0.08987890454197646, '4.9%'), Text(0.68865857544354, 0.12549647990311946, '4.9%'), Text(0.6339916070429881, 0.29674002459905796, '3.3%'), Text(0.5598875085592444, 0.4201499467563003, '3.3%'), Text(0.4621065371279289, 0.5257923053294276, '3.3%'), Text(0.3447837155918029, 0.6091996302220731, '3.3%'), Text(0.3527521991111795, 0.9357167766061624, '1.6%'), Text(0.30560549056298864, 1.1604332312277836, '1.6%'), Text(0.21544698971668436, 1.3833230261302019, '1.6%'), Text(0.08236622744034476, 1.5978785324852591, '1.6%')])
En la comuna de el horario inicial con una mayor cantidad de disponibilidad es a las 13 PM.
Por lo tanto de la muestra podemos observar que a las 13 AM y 15 PM serian los horarios de mayor disponibilidad en la comuna.
Entre las 13 AM y 15 PM es el horario inicial con mayor frecuencia de disponibilidad en esta comuna.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la comuna de Santiago.
Entre las 00 AM y 05 AM es el rango de horario inicial con menor frecuencia de disponibilidad en esta comuna.
el analisis porcentual nos muestra que un 1,6 % es el rango de horario inicial con menor frecuencia de disponibilidad en esta comuna.
groupingpersantiago = dfa[dfa['Comuna']== 'Santiago']['contador'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 61 |
groupingpersantiago = dfa[dfa['Comuna']== 'Santiago']['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingpersantiago)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 14 |
| 23 | 8 |
| 15 | 6 |
| 19 | 5 |
| 22 | 5 |
| 18 | 3 |
| 16 | 3 |
| 14 | 3 |
| 21 | 2 |
| 17 | 2 |
| 13 | 2 |
| 12 | 2 |
| 10 | 2 |
| 20 | 1 |
| 11 | 1 |
| 9 | 1 |
| 8 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.2, 0.4,0.6, 0.8, 1)
grafico = dfa[dfa['Comuna']== 'Santiago']['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e96db460>, <matplotlib.patches.Wedge at 0x299e96dbdc0>, <matplotlib.patches.Wedge at 0x299e96e96d0>, <matplotlib.patches.Wedge at 0x299e96e9fa0>, <matplotlib.patches.Wedge at 0x299e96f88b0>, <matplotlib.patches.Wedge at 0x299e97041c0>, <matplotlib.patches.Wedge at 0x299e9704a90>, <matplotlib.patches.Wedge at 0x299e97123a0>, <matplotlib.patches.Wedge at 0x299e9712c70>, <matplotlib.patches.Wedge at 0x299e9720580>, <matplotlib.patches.Wedge at 0x299e96bb130>, <matplotlib.patches.Wedge at 0x299e972e730>, <matplotlib.patches.Wedge at 0x299e972efa0>, <matplotlib.patches.Wedge at 0x299e973d910>, <matplotlib.patches.Wedge at 0x299e9749220>, <matplotlib.patches.Wedge at 0x299e9749af0>, <matplotlib.patches.Wedge at 0x299e9758400>], [Text(-0.7921825295873827, 0.9013583304194486, '0'), Text(-1.1521798674523074, -0.335382696389637, '23'), Text(-0.6440355073866116, -1.0125306243394665, '15'), Text(-8.426408179945824e-08, -1.199999999999997, '19'), Text(0.5910576026006146, -1.0443423339154716, '22'), Text(0.9598070395182892, -0.7202572088435754, '18'), Text(1.1333870473099101, -0.39425093657482146, '16'), Text(1.1996021590728105, -0.0308975718763018, '14'), Text(1.1679172665257407, 0.2756252139247107, '21'), Text(1.0868427549308366, 0.5086971850269565, '17'), Text(0.9598071575301335, 0.7202570515822291, '13'), Text(0.7921826350764495, 0.9013582377075904, '12'), Text(0.6403126146704912, 1.1313707418409933, '10'), Text(0.5291282986667692, 1.4035751649092436, '20'), Text(0.43294111163090065, 1.6439470775726939, '11'), Text(0.29239234318692875, 1.8773669640338453, '9'), Text(0.1081056735154525, 2.0972155738869027, '8')], [Text(-0.4621064755926399, 0.525792359411345, '23.0%'), Text(-0.6721049226805127, -0.19563990622728825, '13.1%'), Text(-0.37568737930885676, -0.5906428641980221, '9.8%'), Text(-4.915404771635063e-08, -0.6999999999999983, '8.2%'), Text(0.3447836015170251, -0.609199694784025, '8.2%'), Text(0.5598874397190019, -0.42015003849208554, '4.9%'), Text(0.6611424442641142, -0.22997971300197917, '4.9%'), Text(0.6997679261258062, -0.018023583594509382, '4.9%'), Text(0.6812850721400152, 0.16078137478941457, '3.3%'), Text(0.6339916070429881, 0.29674002459905796, '3.3%'), Text(0.5598875085592444, 0.4201499467563003, '3.3%'), Text(0.4621065371279289, 0.5257923053294276, '3.3%'), Text(0.39403853210491757, 0.6962281488252264, '3.3%'), Text(0.3527521991111795, 0.9357167766061624, '1.6%'), Text(0.30560549056298864, 1.1604332312277836, '1.6%'), Text(0.21544698971668436, 1.3833230261302019, '1.6%'), Text(0.08236622744034476, 1.5978785324852591, '1.6%')])
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'contador':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 1 | 26 |
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'hora_desde':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 0 | 4 |
| 17 | 3 |
| 14 | 3 |
| 21 | 2 |
| 16 | 2 |
| 13 | 2 |
| 11 | 2 |
| 10 | 2 |
| 18 | 1 |
| 12 | 1 |
| 9 | 1 |
| 8 | 1 |
| 6 | 1 |
| 5 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Puerto Montt']['hora_desde'].value_counts()
plt.figure(figsize=(7,7))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e979ba30>, <matplotlib.patches.Wedge at 0x299e97aa2b0>, <matplotlib.patches.Wedge at 0x299e97aab80>, <matplotlib.patches.Wedge at 0x299e97b7490>, <matplotlib.patches.Wedge at 0x299e97b7d60>, <matplotlib.patches.Wedge at 0x299e97c5670>, <matplotlib.patches.Wedge at 0x299e97c5f40>, <matplotlib.patches.Wedge at 0x299e97d2850>, <matplotlib.patches.Wedge at 0x299e97e1160>, <matplotlib.patches.Wedge at 0x299e97e1a30>, <matplotlib.patches.Wedge at 0x299e97815b0>, <matplotlib.patches.Wedge at 0x299e97efbe0>, <matplotlib.patches.Wedge at 0x299e97fc4f0>, <matplotlib.patches.Wedge at 0x299e97fcdc0>], [Text(-0.5576678255838395, 1.0625472207429618, '0'), Text(-1.1651301917697234, 0.2871787530905583, '17'), Text(-1.062547207689804, -0.5576678504545521, '14'), Text(-0.5576677509717004, -1.0625472599024317, '21'), Text(8.426408135858538e-08, -1.199999999999997, '16'), Text(0.5576679001959761, -1.0625471815834868, '13'), Text(0.9875807114872482, -0.6816775911663377, '11'), Text(1.191250666887578, -0.14464386831076181, '10'), Text(1.1651301413554267, 0.2871789576293561, '18'), Text(1.0625471489505869, 0.5576679623727542, '12'), Text(0.8982127738720551, 0.7957473297806713, '9'), Text(0.6816775333763497, 0.9875807513767854, '8'), Text(0.4255256695005377, 1.1220195651574527, '6'), Text(0.1446437986026753, 1.1912506753516612, '5')], [Text(-0.32530623159057304, 0.6198192121000611, '15.4%'), Text(-0.6796592785323385, 0.16752093930282563, '11.5%'), Text(-0.6198192044857189, -0.3253062460984887, '11.5%'), Text(-0.32530618806682515, -0.6198192349430851, '7.7%'), Text(4.9154047459174803e-08, -0.6999999999999983, '7.7%'), Text(0.32530627511431937, -0.6198191892570338, '7.7%'), Text(0.5760887483675614, -0.39764526151369695, '7.7%'), Text(0.6948962223510872, -0.0843755898479444, '7.7%'), Text(0.6796592491239988, 0.16752105861712435, '3.8%'), Text(0.6198191702211756, 0.32530631138410654, '3.8%'), Text(0.5239574514253655, 0.46418594237205824, '3.8%'), Text(0.3976452278028706, 0.5760887716364581, '3.8%'), Text(0.24822330720864696, 0.654511413008514, '3.8%'), Text(0.0843755491848939, 0.6948962272884689, '3.8%')])
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 26 |
groupingperptomontt = dfa[dfa['Comuna']== 'Puerto Montt']['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperptomontt)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 17 | 5 |
| 14 | 4 |
| 0 | 4 |
| 19 | 3 |
| 13 | 2 |
| 11 | 2 |
| 16 | 2 |
| 10 | 1 |
| 6 | 1 |
| 21 | 1 |
| 18 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1)
grafico = dfa[dfa['Comuna']== 'Puerto Montt']['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9847e50>, <matplotlib.patches.Wedge at 0x299e98517c0>, <matplotlib.patches.Wedge at 0x299e9861100>, <matplotlib.patches.Wedge at 0x299e98619d0>, <matplotlib.patches.Wedge at 0x299e986f2e0>, <matplotlib.patches.Wedge at 0x299e986fbb0>, <matplotlib.patches.Wedge at 0x299e987d4c0>, <matplotlib.patches.Wedge at 0x299e987dd90>, <matplotlib.patches.Wedge at 0x299e988b6a0>, <matplotlib.patches.Wedge at 0x299e988bf70>, <matplotlib.patches.Wedge at 0x299e982aa90>], [Text(-0.6816777067463067, 0.9875806317081641, '17'), Text(-1.1912506431881233, -0.14464406349339845, '14'), Text(-0.5576677261009869, -1.0625472729555872, '0'), Text(0.4255259715222993, -1.1220194506157206, '19'), Text(0.9875807114872482, -0.6816775911663377, '13'), Text(1.191250666887578, -0.14464386831076181, '11'), Text(1.122019430695411, 0.42552602404782053, '16'), Text(0.8982127738720551, 0.7957473297806713, '10'), Text(0.6816775333763497, 0.9875807513767854, '6'), Text(0.4255256695005377, 1.1220195651574527, '21'), Text(0.1446437986026753, 1.1912506753516612, '18')], [Text(-0.3976453289353455, 0.5760887018297622, '19.2%'), Text(-0.6948962085264053, -0.08437570370448243, '15.4%'), Text(-0.325306173558909, -0.6198192425574257, '15.4%'), Text(0.2482234833880079, -0.6545113461925036, '11.5%'), Text(0.5760887483675614, -0.39764526151369695, '7.7%'), Text(0.6948962223510872, -0.0843755898479444, '7.7%'), Text(0.6545113345723229, 0.24822351402789528, '7.7%'), Text(0.5239574514253655, 0.46418594237205824, '3.8%'), Text(0.3976452278028706, 0.5760887716364581, '3.8%'), Text(0.24822330720864696, 0.654511413008514, '3.8%'), Text(0.0843755491848939, 0.6948962272884689, '3.8%')])
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'contador':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 1 | 17 |
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'hora_desde':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 15 | 4 |
| 9 | 2 |
| 21 | 1 |
| 18 | 1 |
| 16 | 1 |
| 14 | 1 |
| 12 | 1 |
| 11 | 1 |
| 10 | 1 |
| 8 | 1 |
| 7 | 1 |
| 4 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1)
grafico = dfa[dfa['Comuna']== 'Puente Alto']['hora_desde'].value_counts()
plt.figure(figsize=(7,7))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e98e3640>, <matplotlib.patches.Wedge at 0x299e98e3f70>, <matplotlib.patches.Wedge at 0x299e98f08b0>, <matplotlib.patches.Wedge at 0x299e98fe1c0>, <matplotlib.patches.Wedge at 0x299e98fea90>, <matplotlib.patches.Wedge at 0x299e990c3a0>, <matplotlib.patches.Wedge at 0x299e990cc70>, <matplotlib.patches.Wedge at 0x299e9919580>, <matplotlib.patches.Wedge at 0x299e9919e50>, <matplotlib.patches.Wedge at 0x299e9927760>, <matplotlib.patches.Wedge at 0x299e98c4250>, <matplotlib.patches.Wedge at 0x299e9937940>, <matplotlib.patches.Wedge at 0x299e9944250>], [Text(-0.808434774817904, 0.8868106984385815, '15'), Text(-1.1541907695466027, -0.32839559603231827, '9'), Text(-0.8084347644392532, -0.886810707899972, '21'), Text(-0.4334899878695964, -1.1189666797616529, '18'), Text(1.404401373133859e-08, -1.2, '16'), Text(0.43349001406090104, -1.1189666696150873, '14'), Text(0.8084347851965551, -0.8868106889771908, '12'), Text(1.0741959580954263, -0.5348860099230949, '11'), Text(1.1948810134596564, -0.1107220107911033, '10'), Text(1.1541907657032757, 0.32839560954021035, '8'), Text(0.9576206582987077, 0.7231615827735527, '7'), Text(0.6317185736790452, 1.0202605763572916, '4'), Text(0.22049939458216194, 1.1795677246300444, '1')], [Text(-0.4715869519771107, 0.5173062407558392, '23.5%'), Text(-0.6732779489021847, -0.191564097685519, '11.8%'), Text(-0.4715869459228976, -0.5173062462749836, '5.9%'), Text(-0.2528691595905979, -0.6527305631942975, '5.9%'), Text(8.192341343280845e-09, -0.6999999999999998, '5.9%'), Text(0.2528691748688589, -0.6527305572754676, '5.9%'), Text(0.4715869580313238, -0.5173062352366946, '5.9%'), Text(0.6266143088889987, -0.3120168391218053, '5.9%'), Text(0.6970139245181327, -0.0645878396281436, '5.9%'), Text(0.6732779466602441, 0.1915641055651227, '5.9%'), Text(0.5586120506742461, 0.4218442566179057, '5.9%'), Text(0.36850250131277634, 0.5951520028750867, '5.9%'), Text(0.12862464683959446, 0.6880811727008591, '5.9%')])
En la comuna de Puente Alto el horario inicial con una mayor cantidad de disponibilidad es a las 15 PM.
Por lo tanto de la muestra podemos observar que a las 09 AM y 15 PM serian los horarios de mayor disponibilidad en la comuna.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la comuna de Puente Alto.
Entre las 01 AM y 04 AM es el rango de horario inicial con menor frecuencia de disponibilidad en esta comuna.
la descripcion nos muestra que un 5,9 % es el porcentual de horario inicial con menor frecuencia de disponibilidad en esta comuna.
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['contador'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 17 |
groupingperptealto = dfa[dfa['Comuna']== 'Puente Alto']['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperptealto)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 0 | 3 |
| 15 | 2 |
| 9 | 2 |
| 20 | 2 |
| 18 | 2 |
| 14 | 1 |
| 11 | 1 |
| 10 | 1 |
| 7 | 1 |
| 21 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1)
grafico = dfa[dfa['Comuna']== 'Puente Alto']['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e997fc70>, <matplotlib.patches.Wedge at 0x299e998c5e0>, <matplotlib.patches.Wedge at 0x299e998cdc0>, <matplotlib.patches.Wedge at 0x299e999a610>, <matplotlib.patches.Wedge at 0x299e999ae20>, <matplotlib.patches.Wedge at 0x299e99a9670>, <matplotlib.patches.Wedge at 0x299e99a9e80>, <matplotlib.patches.Wedge at 0x299e99b96d0>, <matplotlib.patches.Wedge at 0x299e99b9ee0>, <matplotlib.patches.Wedge at 0x299e99c8730>, <matplotlib.patches.Wedge at 0x299e9964ee0>], [Text(-0.6317186095004279, 1.0202605541776308, '0'), Text(-1.1948810147554738, 0.110721996806999, '15'), Text(-0.9576206498352982, -0.7231615939809176, '9'), Text(-0.22049938077727382, -1.1795677272106246, '20'), Text(0.6317186333813491, -1.0202605393911894, '18'), Text(1.0741959706153366, -0.5348859847797239, '14'), Text(1.1948810160512915, -0.11072198282289496, '11'), Text(1.1541907580166215, 0.3283956365559946, '10'), Text(0.9576206413718885, 0.7231616051882822, '7'), Text(0.6317185497981229, 1.0202605911437317, '21'), Text(0.22049936697238698, 1.1795677297912048, '1')], [Text(-0.36850252220858287, 0.5951519899369512, '17.6%'), Text(-0.6970139252740264, 0.06458783147074941, '11.8%'), Text(-0.5586120457372572, -0.42184426315553525, '11.8%'), Text(-0.12862463878674305, -0.6880811742061977, '11.8%'), Text(0.36850253613912026, -0.5951519813115271, '11.8%'), Text(0.6266143161922796, -0.31201682445483897, '5.9%'), Text(0.69701392602992, -0.06458782331335539, '5.9%'), Text(0.6732779421763624, 0.19156412132433015, '5.9%'), Text(0.5586120408002683, 0.42184426969316463, '5.9%'), Text(0.36850248738223834, 0.59515201150051, '5.9%'), Text(0.12862463073389238, 0.688081175711536, '5.9%')])
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 1 | 23 |
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'hora_desde':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 10 | 3 |
| 21 | 2 |
| 17 | 2 |
| 15 | 2 |
| 14 | 2 |
| 12 | 2 |
| 9 | 2 |
| 8 | 2 |
| 22 | 1 |
| 20 | 1 |
| 13 | 1 |
| 11 | 1 |
| 5 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Antofagasta']['hora_desde'].value_counts()
plt.figure(figsize=(7,7))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9a139a0>, <matplotlib.patches.Wedge at 0x299e9a222e0>, <matplotlib.patches.Wedge at 0x299e9a22af0>, <matplotlib.patches.Wedge at 0x299e9a30340>, <matplotlib.patches.Wedge at 0x299e9a30b50>, <matplotlib.patches.Wedge at 0x299e9a413a0>, <matplotlib.patches.Wedge at 0x299e9a41bb0>, <matplotlib.patches.Wedge at 0x299e9a51400>, <matplotlib.patches.Wedge at 0x299e9a51c10>, <matplotlib.patches.Wedge at 0x299e9a5f460>, <matplotlib.patches.Wedge at 0x299e99e6b80>, <matplotlib.patches.Wedge at 0x299e9a6f490>, <matplotlib.patches.Wedge at 0x299e9a6fca0>, <matplotlib.patches.Wedge at 0x299e9a7d4f0>], [Text(-0.4780813033350278, 1.100653563752683, '10'), Text(-1.0654622603973305, 0.5520780485302883, '21'), Text(-1.197202522445275, -0.08189090456620655, '17'), Text(-0.9803638596402342, -0.6920164034987201, '15'), Text(-0.47808127757237245, -1.1006535749429829, '14'), Text(0.1634000236797263, -1.1888231290908942, '12'), Text(0.7573055777149753, -0.9308535126225757, '9'), Text(1.130713129853371, -0.40185546901491054, '8'), Text(1.1972025176532852, 0.08189097462257519, '22'), Text(1.1307130781197785, 0.40185561457928654, '20'), Text(0.9803638191457004, 0.6920164608663992, '13'), Text(0.7573054578798752, 0.9308536101156576, '11'), Text(0.47808121316573043, 1.100653602918731, '5'), Text(0.16339987063445083, 1.188823150126479, '1')], [Text(-0.2788807602787662, 0.642047912189065, '13.0%'), Text(-0.6215196518984427, 0.3220455283093348, '8.7%'), Text(-0.6983681380930769, -0.047769694330287146, '8.7%'), Text(-0.5718789181234699, -0.40367623537425334, '8.7%'), Text(-0.27888074525055057, -0.6420479187167399, '8.7%'), Text(0.09531668047984035, -0.6934801586363549, '8.7%'), Text(0.4417615870004022, -0.542997882363169, '8.7%'), Text(0.6595826590811331, -0.2344156902586978, '8.7%'), Text(0.6983681352977498, 0.04776973519650219, '4.3%'), Text(0.6595826289032041, 0.23441577517125048, '4.3%'), Text(0.5718788945016585, 0.4036762688387328, '4.3%'), Text(0.4417615170965939, 0.5429979392341335, '4.3%'), Text(0.2788807076800094, 0.6420479350359263, '4.3%'), Text(0.09531659120342964, 0.6934801709071127, '4.3%')])
En la comuna de Antofagasta el horario inicial con una mayor cantidad de disponibilidad es a las 10 AM.
Por lo tanto de la muestra podemos observar que a las 10 AM y 21 PM serian los horarios de mayor disponibilidad en la comuna.
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['contador'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 23 |
groupingperantofagasta = dfa[dfa['Comuna']== 'Antofagasta']['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingperantofagasta)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 15 | 3 |
| 0 | 3 |
| 22 | 2 |
| 21 | 2 |
| 17 | 2 |
| 13 | 2 |
| 12 | 2 |
| 23 | 1 |
| 20 | 1 |
| 10 | 1 |
| 8 | 1 |
| 5 | 1 |
| 2 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1,0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1,0.1, 0.1)
grafico = dfa[dfa['Comuna']== 'Antofagasta']['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9ab5f10>, <matplotlib.patches.Wedge at 0x299e9ac6850>, <matplotlib.patches.Wedge at 0x299e9ad30a0>, <matplotlib.patches.Wedge at 0x299e9ad38b0>, <matplotlib.patches.Wedge at 0x299e9ae2100>, <matplotlib.patches.Wedge at 0x299e9ae2910>, <matplotlib.patches.Wedge at 0x299e9af1160>, <matplotlib.patches.Wedge at 0x299e9af1970>, <matplotlib.patches.Wedge at 0x299e9b021c0>, <matplotlib.patches.Wedge at 0x299e9b029d0>, <matplotlib.patches.Wedge at 0x299e9aa1040>, <matplotlib.patches.Wedge at 0x299e9b10a00>, <matplotlib.patches.Wedge at 0x299e9b1f250>, <matplotlib.patches.Wedge at 0x299e9b1fa60>], [Text(-0.4780813033350278, 1.100653563752683, '15'), Text(-1.1307131016350502, 0.4018555484136618, '0'), Text(-1.1307131110411577, -0.4018555219474115, '22'), Text(-0.7573055341385765, -0.9308535480746074, '21'), Text(-0.16339996802689996, -1.1888231367402, '17'), Text(0.4780813290976834, -1.1006535525623822, '13'), Text(0.9803638920358589, -0.6920163576045749, '12'), Text(1.1749009142877322, -0.24414717202099873, '23'), Text(1.1972025195700817, 0.08189094660002708, '20'), Text(1.1307130875258875, 0.40185558811303707, '10'), Text(0.9803638353435142, 0.692016437919328, '8'), Text(0.7573054796680762, 0.9308535923896439, '5'), Text(0.4780812389283879, 1.100653591728432, '2'), Text(0.16339989846086456, 1.1888231463018288, '1')], [Text(-0.2788807602787662, 0.642047912189065, '13.0%'), Text(-0.6595826426204459, 0.23441573657463602, '13.0%'), Text(-0.659582648107342, -0.23441572113599, '8.7%'), Text(-0.4417615615808363, -0.5429979030435209, '8.7%'), Text(-0.09531664801569165, -0.69348016309845, '8.7%'), Text(0.27888077530698197, -0.6420479056613896, '8.7%'), Text(0.5718789370209176, -0.4036762086026686, '8.7%'), Text(0.6853588666678437, -0.1424191836789159, '4.3%'), Text(0.6983681364158809, 0.04776971885001579, '4.3%'), Text(0.659582634390101, 0.23441575973260492, '4.3%'), Text(0.5718789039503832, 0.40367625545294133, '4.3%'), Text(0.44176152980637773, 0.5429979288939589, '4.3%'), Text(0.2788807227082262, 0.642047928508252, '4.3%'), Text(0.09531660743550432, 0.6934801686760668, '4.3%')])
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['contador'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'contador':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 1 | 15 |
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['hora_desde'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'hora_desde':'requerimientos'})
grouping
| requerimientos | |
|---|---|
| 11 | 3 |
| 10 | 2 |
| 7 | 2 |
| 22 | 2 |
| 23 | 2 |
| 14 | 1 |
| 13 | 1 |
| 9 | 1 |
| 8 | 1 |
desfase = (0.1,0.1,0.1,0.1,0.1, 0.1,0.1, 0.1,0.1)
grafico = dfa[dfa['Comuna']== 'Maipú']['hora_desde'].value_counts()
plt.figure(figsize=(7,7))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9b6c370>, <matplotlib.patches.Wedge at 0x299e9b6cca0>, <matplotlib.patches.Wedge at 0x299e9b7b4c0>, <matplotlib.patches.Wedge at 0x299e9b7bcd0>, <matplotlib.patches.Wedge at 0x299e9b8a520>, <matplotlib.patches.Wedge at 0x299e9b8ad30>, <matplotlib.patches.Wedge at 0x299e9b99580>, <matplotlib.patches.Wedge at 0x299e9b99d90>, <matplotlib.patches.Wedge at 0x299e9ba75e0>], [Text(-0.705342311840444, 0.9708203866460459, '11'), Text(-1.1934262693528634, -0.125434204340391, '10'), Text(-0.7053422209456771, -0.9708204526849543, '7'), Text(0.2494941791738013, -1.1737770889561574, '22'), Text(1.0392305875307437, -0.5999998216170612, '23'), Text(1.1934262488008514, 0.12543439987949428, '14'), Text(1.039230348782502, 0.6000002351411201, '13'), Text(0.7053420618798191, 0.9708205682530248, '9'), Text(0.24949371211177657, 1.1737771882332209, '8')], [Text(-0.41144968190692566, 0.5663118922101934, '20.0%'), Text(-0.6961653237891703, -0.07316995253189475, '13.3%'), Text(-0.4114496288849783, -0.56631193073289, '13.3%'), Text(0.1455382711847174, -0.6847033018910919, '13.3%'), Text(0.6062178427262672, -0.3499998959432856, '13.3%'), Text(0.6961653118004965, 0.07317006659637165, '6.7%'), Text(0.6062177034564594, 0.35000013716565337, '6.7%'), Text(0.4114495360965611, 0.5663119981475977, '6.7%'), Text(0.14553799873186968, 0.6847033598027121, '6.7%')])
En la comuna de Maipú el horario inicial con una mayor cantidad de disponibilidad es a las 11 AM.
Por lo tanto de la muestra podemos observar que entre las 09 AM y 10 AM serian los horarios de mayor disponibilidad en la comuna.
Se puede observar que existen horarios que no registran frecuencia de disponibilidad inicial en la comuna de Maipú.
La muestra seleccionada nos muestra que entre las 08 AM y 09 AM es el rango de horario final con menor frecuencia de disponibilidad en esta comuna.
la descripcion nos muestra que un 6,7 % es el porcentual de horario inicial con menor frecuencia de disponibilidad en esta comuna.
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['contador'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'contador':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 1 | 15 |
groupingpermaipu = dfa[dfa['Comuna']== 'Maipú']['hora_hasta'].value_counts()
grouping = pd.DataFrame(groupingpermaipu)
grouping = grouping.rename(columns={'hora_hasta':'disponibilidad'})
grouping
| disponibilidad | |
|---|---|
| 22 | 3 |
| 11 | 2 |
| 10 | 2 |
| 23 | 2 |
| 0 | 2 |
| 14 | 1 |
| 7 | 1 |
| 21 | 1 |
| 1 | 1 |
desfase = (0.1,0.1,0.1,0.1,0.1,0.1,0.1, 0.1,0.1)
grafico = dfa[dfa['Comuna']== 'Maipú']['hora_hasta'].value_counts()
plt.figure(figsize=(7,6))
plt.pie(grafico, autopct='%1.1f%%', shadow=True, startangle=90, labels = grafico.index, explode=desfase)
([<matplotlib.patches.Wedge at 0x299e9be2fd0>, <matplotlib.patches.Wedge at 0x299e9bf0940>, <matplotlib.patches.Wedge at 0x299e9bfe160>, <matplotlib.patches.Wedge at 0x299e9bfe970>, <matplotlib.patches.Wedge at 0x299e9c0d1c0>, <matplotlib.patches.Wedge at 0x299e9c0d9d0>, <matplotlib.patches.Wedge at 0x299e9c1d220>, <matplotlib.patches.Wedge at 0x299e9c1da30>, <matplotlib.patches.Wedge at 0x299e9c2c280>], [Text(-0.705342311840444, 0.9708203866460459, '22'), Text(-1.1934262693528634, -0.125434204340391, '11'), Text(-0.7053422209456771, -0.9708204526849543, '10'), Text(0.2494941791738013, -1.1737770889561574, '23'), Text(1.0392305875307437, -0.5999998216170612, '0'), Text(1.1934262488008514, 0.12543439987949428, '14'), Text(1.039230348782502, 0.6000002351411201, '7'), Text(0.7053420618798191, 0.9708205682530248, '21'), Text(0.24949371211177657, 1.1737771882332209, '1')], [Text(-0.41144968190692566, 0.5663118922101934, '20.0%'), Text(-0.6961653237891703, -0.07316995253189475, '13.3%'), Text(-0.4114496288849783, -0.56631193073289, '13.3%'), Text(0.1455382711847174, -0.6847033018910919, '13.3%'), Text(0.6062178427262672, -0.3499998959432856, '13.3%'), Text(0.6961653118004965, 0.07317006659637165, '6.7%'), Text(0.6062177034564594, 0.35000013716565337, '6.7%'), Text(0.4114495360965611, 0.5663119981475977, '6.7%'), Text(0.14553799873186968, 0.6847033598027121, '6.7%')])